aboutsummaryrefslogtreecommitdiff
path: root/network/rspamd
diff options
context:
space:
mode:
authorRuben Schuller <sb@rbn.im>2021-07-16 22:05:29 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-19 16:23:31 +0700
commitf04271675d307c17bfac1896b9ececc143f3bfd9 (patch)
tree3e6fc6f54c5a782041564c1e7ba93662cf596d78 /network/rspamd
parente4736bc4229cf86418408ab7e6071ced049b318e (diff)
network/rspamd: Create piddir during init
Signed-off-by: Robby Workman <rworkman@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/rspamd')
-rw-r--r--network/rspamd/rc.rspamd.new5
-rw-r--r--network/rspamd/rspamd.SlackBuild4
2 files changed, 5 insertions, 4 deletions
diff --git a/network/rspamd/rc.rspamd.new b/network/rspamd/rc.rspamd.new
index 8c3e78f9084ce..02be8b85df2ac 100644
--- a/network/rspamd/rc.rspamd.new
+++ b/network/rspamd/rc.rspamd.new
@@ -10,6 +10,11 @@ CONF=/etc/rspamd/rspamd.conf
DAEMON_ARGS="-c $CONF -u $NAME -g $NAME"
rspamd_start() {
+ if [ ! -d $(dirname $PIDFILE) ]; then
+ mkdir $(dirname $PIDFILE)
+ chown rspamd:rspamd $(dirname $PIDFILE)
+ fi
+
if [ ! -r $CONF ]; then
echo "$CONF does not appear to exist. Abort."
exit 1
diff --git a/network/rspamd/rspamd.SlackBuild b/network/rspamd/rspamd.SlackBuild
index e58a9a286c2ff..190f5db966299 100644
--- a/network/rspamd/rspamd.SlackBuild
+++ b/network/rspamd/rspamd.SlackBuild
@@ -123,10 +123,6 @@ mkdir -p $PKG/var/log/rspamd
chown rspamd:rspamd $PKG/var/log/rspamd
chmod 0755 $PKG/var/log/rspamd
-mkdir -p $PKG/var/run/rspamd
-chown rspamd:rspamd $PKG/var/run/rspamd
-chmod 0750 $PKG/var/run/rspamd
-
mkdir -p $PKG/var/lib/rspamd
chown rspamd:rspamd $PKG/var/lib/rspamd
chmod 0750 $PKG/var/lib/rspamd