summaryrefslogtreecommitdiff
path: root/extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new')
-rw-r--r--extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new38
1 files changed, 38 insertions, 0 deletions
diff --git a/extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new b/extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new
new file mode 100644
index 00000000..e5cfe65a
--- /dev/null
+++ b/extra/source/sendmail/_sendmail/etc/rc.d/rc.sendmail.new
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Start/stop/restart sendmail.
+
+# Start sendmail:
+sendmail_start() {
+ if [ -x /usr/sbin/sendmail ]; then
+ echo "Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q25m"
+ /usr/sbin/sendmail -L sm-mta -bd -q25m
+ echo "Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m"
+ /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
+ fi
+}
+
+# Stop sendmail:
+sendmail_stop() {
+ killall sendmail
+}
+
+# Restart sendmail:
+sendmail_restart() {
+ sendmail_stop
+ sleep 1
+ sendmail_start
+}
+
+case "$1" in
+'start')
+ sendmail_start
+ ;;
+'stop')
+ sendmail_stop
+ ;;
+'restart')
+ sendmail_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac