summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Pedersen <xpunkt@users.noreply.github.com>2016-01-11 18:03:58 +0100
committerDirkjan Ochtman <djc@gentoo.org>2016-01-13 17:28:40 +0100
commit327bb1b6b7a73f12e57f0faf23786940dae9ea30 (patch)
tree41f5c8a9e8429be52db1d873d9026ad82203fe36 /mail-filter
parentsys-devel/gcc: roll new snapshots to fix building w/newer gcc (diff)
downloadgentoo-327bb1b6b7a73f12e57f0faf23786940dae9ea30.tar.gz
gentoo-327bb1b6b7a73f12e57f0faf23786940dae9ea30.tar.bz2
gentoo-327bb1b6b7a73f12e57f0faf23786940dae9ea30.zip
mail-filter/rspamd: create /var/run at run time
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/rspamd/files/rspamd.init9
-rw-r--r--mail-filter/rspamd/rspamd-1.0.11.ebuild4
2 files changed, 10 insertions, 3 deletions
diff --git a/mail-filter/rspamd/files/rspamd.init b/mail-filter/rspamd/files/rspamd.init
index 8ba223193683..3f5df5b390c3 100644
--- a/mail-filter/rspamd/files/rspamd.init
+++ b/mail-filter/rspamd/files/rspamd.init
@@ -5,7 +5,8 @@
extra_commands="checkconfig"
extra_started_commands="reload"
-PIDFILE=/var/run/rspamd/rspamd.pid
+RUNDIR=/var/run/rspamd
+PIDFILE=$RUNDIR/rspamd.pid
depend() {
need net
@@ -19,6 +20,12 @@ checkconfig() {
start() {
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
+
+ mkdir -m0750 -p $RUNDIR
+ chown rspamd:rspamd $RUNDIR
+ chmod g+s $RUNDIR
+ rm -f $RUNDIR/$SVCNAME.sock
+
start-stop-daemon --start --quiet --pidfile $PIDFILE -u rspamd -g rspamd \
--exec /usr/bin/rspamd
eend $?
diff --git a/mail-filter/rspamd/rspamd-1.0.11.ebuild b/mail-filter/rspamd/rspamd-1.0.11.ebuild
index 73e673817e76..97460a2640bc 100644
--- a/mail-filter/rspamd/rspamd-1.0.11.ebuild
+++ b/mail-filter/rspamd/rspamd-1.0.11.ebuild
@@ -46,8 +46,8 @@ src_install() {
dodir /var/lib/rspamd
dodir /var/log/rspamd
- dodir /var/run/rspamd
- fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd /var/run/rspamd
+
+ fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
insinto /etc/logrotate.d
newins "${FILESDIR}/rspamd.logrotate" rspamd