slackbuilds_ponce/network/opensmtpd/rc.opensmtpd
Robby Workman 943df74e48 network/opensmtpd: Added (Open SMTPd)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2013-04-15 17:21:03 -05:00

34 lines
470 B
Bash

#!/bin/sh
# Start/stop/restart opensmtpd
smtpd_start() {
if [ -x /usr/sbin/smtpd ]; then
echo "Starting OpenSMTPD: /usr/sbin/smtpd"
smtpd # not using full path to work around a logging bug for now
fi
}
smtpd_stop() {
smtpctl stop
}
# 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