]> git.pld-linux.org Git - packages/sendmail.git/commitdiff
- reload added, added sm-client starting (don't collect mails forever...)
authorPaweł Gołaszewski <blues@pld-linux.org>
Tue, 13 Jul 2004 12:15:12 +0000 (12:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    sendmail.init -> 1.17
    sendmail.sysconfig -> 1.7

sendmail.init
sendmail.sysconfig

index 34127ced3ce41acd355e75167836ac34afc25914..25f8ba9e6c8d693d2b98760ac8151cc7efef4900 100644 (file)
@@ -23,6 +23,8 @@ else
        QUEUE=1h
        ENABLE_IPV6=yes
 fi
+[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
+[ -z "$SMQUEUE" ] && SMQUEUE=1h
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
@@ -60,6 +62,16 @@ case "$1" in
        else
                msg_already_running sendmail
        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
+       else
+               msg_already_running sm-client
+       fi
        ;;
   stop)
        if [ -f /var/lock/subsys/sendmail ]; then
@@ -70,18 +82,38 @@ case "$1" in
        else
                msg_not_running sendmail
        fi
+       if [ -f /var/lock/subsys/sm-client ]; then
+               msg_stopping sm-client
+               killproc 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)
        $0 stop
        $0 start
        exit $?
        ;;
+  reload)
+       # TODO: make it better for sm-client
+       if [ -f /var/lock/subsys/sendmail ]; then
+               msg_reloading sendmail
+               busy
+               killproc sendmail -HUP
+               RETVAL=$?
+       else
+               msg_not_running sendmail
+       fi
+       ;;
   status)
        status sendmail
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
        exit 3
 esac
 
index e806be3d84d61b112c1fc9e3a7180bd0365bafc6..2a9a6dd4b58224cf774530c71c1df5bc72533544 100644 (file)
@@ -9,5 +9,8 @@ DAEMON=yes
 # Queue
 QUEUE=1h
 
+# Sendmail Client Queue (if commented - the same as Sendmail)
+#SMQUEUE=6h
+
 # Enable IPV6?
 ENABLE_IPV6=yes
This page took 0.040866 seconds and 4 git commands to generate.