Skip to content

Commit

Permalink
Improve Debian startup script (Adam Katz)
Browse files Browse the repository at this point in the history
  • Loading branch information
manu committed May 9, 2009
1 parent 72690dc commit c1b7812
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
4.3.3
Improve Debian startup script (Adam Katz)
4.3.2
Merge autowhite and greylist databases (Rudy Eschauzier)
4.3.1
Expand Down
20 changes: 19 additions & 1 deletion rc-debian.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,25 @@ case "$1" in
echo "$NAME."
;;

restart|force-reload|reload)
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --pidfile $PIDFILE --name $PNAME \
--retry 5 --oknodo
start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
$NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS

echo "$NAME."
;;

reload)
echo -n "Checking config: "
if sudo -u $USER $DAEMON -c 2>&1 |grep -v 'config .* okay$' |grep . >&2
then
echo "failed. Quitting with error, no action taken."
exit 1
else
echo "passed."
fi
echo -n "Restarting $DESC: "
start-stop-daemon --stop --pidfile $PIDFILE --name $PNAME \
--retry 5 --oknodo
Expand Down

0 comments on commit c1b7812

Please sign in to comment.