aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/postinst7
-rwxr-xr-xdebian/rspamd.init1
2 files changed, 2 insertions, 6 deletions
diff --git a/debian/postinst b/debian/postinst
index bfd3a53c4..7c30263bd 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -6,7 +6,6 @@ set -e
case "$1" in
configure)
SERVER_HOME=/var/lib/rspamd
- SERVER_RUN=/var/run/rspamd
SERVER_LOG=/var/log/rspamd
SERVER_USER=rspamd
SERVER_NAME="Rspamd spam filtering system"
@@ -20,15 +19,11 @@ case "$1" in
--gecos "$SERVER_NAME" \
$SERVER_USER
- # 2. create homedir if not existing
- test -d $SERVER_RUN || mkdir $SERVER_RUN
-
# 5. adjust file and directory permissions
if ! dpkg-statoverride --list $SERVER_HOME >/dev/null
then
- chown -R $SERVER_USER:$SERVER_GROUP $SERVER_HOME $SERVER_LOG $SERVER_RUN
+ chown -R $SERVER_USER:$SERVER_GROUP $SERVER_HOME $SERVER_LOG
chmod u=rwx,g=rx,o= $SERVER_HOME
- chmod u=rwx,g=rx,o=rx $SERVER_RUN
chmod u=rwx,g=rx,o=rx $SERVER_LOG
fi
;;
diff --git a/debian/rspamd.init b/debian/rspamd.init
index 91b5c6e68..aad89dcfc 100755
--- a/debian/rspamd.init
+++ b/debian/rspamd.init
@@ -55,6 +55,7 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
+ mkdir -m 755 $RSPAMD_USERNAME:$RSPAMD_GROUPNAME -p /var/run/rspamd
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \