[ "$NETWORKING" = "no" ] && exit 0
rspamd="/usr/bin/rspamd"
+rspamadm="/usr/bin/rspamadm"
prog=$(basename $rspamd)
RSPAMD_CONF_FILE="/etc/rspamd/rspamd.sysvinit.conf"
}
configtest() {
- $rspamd -u $RSPAMD_USER -g $RSPAMD_GROUP -t -c $RSPAMD_CONF_FILE
+ $rspamadm configtest -c $RSPAMD_CONF_FILE
}
rh_status() {
DESC="Rspamd"
NAME=rspamd
DAEMON=/usr/bin/$NAME
+RSPAMADM=/usr/bin/rspamdadm
DAEMON_ARGS="-c /etc/rspamd/rspamd.sysvinit.conf"
DESC="rapid spam filtering system"
PIDFILE=/run/rspamd/$NAME.pid
# 2 if daemon could not be started
mkdir -m 755 -p /run/rspamd
chown _rspamd:_rspamd /run/rspamd
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ $RSPAMADM configtest $DAEMON_ARGS > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS -u _rspamd -g _rspamd \