[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

What's the mistake in this init script?



Sometimes /etc/init.d/exim restart stops but doesn't restart 
the exim daemon.  Does anyone see anything wrong?

#!/bin/sh
[ -x /usr/local/exim/bin/exim -a -f /etc/exim-af/exim.conf ] || exit 0
PATH=/sbin:/bin
case "$1" in
        start)
                echo -n "Starting EXIM"
                start-stop-daemon --start --quiet --exec /usr/local/exim/bin/exim -- -bd
                echo "."
                ;;
        stop)
                echo -n "Stopping EXIM"
                start-stop-daemon --stop --quiet --exec /usr/local/exim/bin/exim
                echo "."
                ;;
        restart|force-reload)
                echo -n "Restarting EXIM... "
                start-stop-daemon --stop --quiet --exec /usr/local/exim/bin/exim
                sleep 2
                start-stop-daemon --start --quiet --exec /usr/local/exim/bin/exim -- -bd
                echo "done."
                ;;
        *)
                echo "Usage: /etc/init.d/exim {start|stop|restart|force-reload}"
                exit 1
                ;;
esac
exit 0



Reply to: