]> git.pld-linux.org Git - packages/sendmail.git/blobdiff - sendmail.init
- use pidfiles to kill sendmail procs
[packages/sendmail.git] / sendmail.init
index 25f8ba9e6c8d693d2b98760ac8151cc7efef4900..20e3fa8dda296892706e19a2cd1e5bf3bef227b8 100644 (file)
@@ -64,8 +64,6 @@ case "$1" in
        fi
        if [ ! -f /var/lock/subsys/sm-client ]; then
                msg_starting sm-client
-               touch /var/run/sm-client.pid
-               chown smmsp:smmsp /var/run/sm-client.pid
                daemon /usr/sbin/sendmail -L sm-msp-queue -Ac -q$SMQUEUE
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
@@ -77,27 +75,27 @@ case "$1" in
        if [ -f /var/lock/subsys/sendmail ]; then
                # Stop daemons.
                msg_stopping sendmail
-               killproc sendmail
-               rm -f /var/lock/subsys/sendmail
+               killproc --pidfile sendmail.pid sendmail
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
        else
                msg_not_running sendmail
        fi
        if [ -f /var/lock/subsys/sm-client ]; then
                msg_stopping sm-client
-               killproc sendmail
+               killproc --pidfile /var/spool/clientmqueue/sm-client.pid sendmail
                RETVAL=$?
-               [ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
                [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client
        else
                msg_not_running sm-client
        fi
        ;;
-  restart|force-reload)
+  restart)
        $0 stop
        $0 start
        exit $?
        ;;
-  reload)
+  reload|force-reload)
        # TODO: make it better for sm-client
        if [ -f /var/lock/subsys/sendmail ]; then
                msg_reloading sendmail
This page took 0.029325 seconds and 4 git commands to generate.