summaryrefslogtreecommitdiffstats
path: root/debian/rspamd.init
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2014-03-28 15:01:33 +0100
committerMikhail Gusarov <dottedmag@dottedmag.net>2014-03-28 15:01:33 +0100
commit9f154d9db35d4df58ec8d6effd0bde310a5d2614 (patch)
tree6ba36fc81c299fcebbd0e1fbe02dc634d4d8a831 /debian/rspamd.init
parent1771fb92d2d493ff003d82b07a394aaafe45580b (diff)
downloadrspamd-9f154d9db35d4df58ec8d6effd0bde310a5d2614.tar.gz
rspamd-9f154d9db35d4df58ec8d6effd0bde310a5d2614.zip
Update Debianization from 0.6 branch
Diffstat (limited to 'debian/rspamd.init')
-rwxr-xr-xdebian/rspamd.init9
1 files changed, 2 insertions, 7 deletions
diff --git a/debian/rspamd.init b/debian/rspamd.init
index 629f43ebe..0c84118da 100755
--- a/debian/rspamd.init
+++ b/debian/rspamd.init
@@ -20,15 +20,10 @@ DAEMON_ARGS="-c /etc/rspamd/rspamd.conf"
DESC="rapid spam filtering system"
PIDFILE=/run/rspamd/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
-RSPAMD_USERNAME=_rspamd
-RSPAMD_GROUPNAME=_rspamd
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
@@ -45,11 +40,11 @@ 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 /run/rspamd
+ mkdir -m 755 _rspamd:_rspamd -p /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 -- \
- $DAEMON_ARGS -u $RSPAMD_USERNAME -g $RSPAMD_GROUPNAME \
+ $DAEMON_ARGS -u _rspamd -g _rspamd \
|| return 2
}