QUEUE=1h
ENABLE_IPV6=yes
fi
+[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
+[ -z "$SMQUEUE" ] && SMQUEUE=1h
# Check that networking is up.
if is_yes "${NETWORKING}"; then
else
msg_already_running sendmail
fi
+ if [ ! -f /var/lock/subsys/sm-client ]; then
+ msg_starting sm-client
+ 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
# 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 --pidfile /var/spool/clientmqueue/sm-client.pid sendmail
+ RETVAL=$?
+ [ $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|force-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