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/rspamd/files
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/rspamd/files')
-rw-r--r--mail-filter/rspamd/files/rspamd.init9
1 files changed, 8 insertions, 1 deletions
diff --git a/mail-filter/rspamd/files/rspamd.init b/mail-filter/rspamd/files/rspamd.init
index 8ba22319368..3f5df5b390c 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 $?