slackbuilds_ponce/network/opensmtpd/rc.opensmtpd
Richard Narron 8f385ee513 network/opensmtpd: Updated for version 1.0.2 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2015-07-22 15:05:19 +07:00

34 lines
436 B
Bash

#!/bin/sh
# Start/stop/restart opensmtpd
smtpd_start() {
if [ -x /usr/sbin/smtpd ]; then
echo "Starting OpenSMTPD: /usr/sbin/smtpd"
/usr/sbin/smtpd
fi
}
smtpd_stop() {
smtpctl stop || pkill smtpd
}
# Restart smtpd:
smtpd_restart() {
smtpd_stop
sleep 1
smtpd_start
}
case "$1" in
'start')
smtpd_start
;;
'stop')
smtpd_stop
;;
'restart')
smtpd_restart
;;
*)
echo "usage $0 start|stop|restart"
esac