summaryrefslogtreecommitdiff
path: root/debian/init.d
diff options
context:
space:
mode:
authorRichard Nelson <cowboy@debian.org>1998-06-23 10:00:00 -0500
committerAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:37 +0200
commit6202a816311c5e56f71ecd358850b1e6d8cd7065 (patch)
treede47ad4f657df101b6f36a07a6c6e19191be7de9 /debian/init.d
parent6c193ce1dd1d07ebdc1372e38bc4908ab1c37705 (diff)
downloadsendmail-6202a816311c5e56f71ecd358850b1e6d8cd7065.tar.gz
Imported Debian patch 8.8.8-20debian/8.8.8-20
Diffstat (limited to 'debian/init.d')
-rw-r--r--debian/init.d62
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/init.d b/debian/init.d
new file mode 100644
index 0000000..ff8422a
--- /dev/null
+++ b/debian/init.d
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# Start or stop sendmail
+#
+# Robert Leslie <rob@mars.org>
+# Johnie Ingram <johnie@netgod.net>
+# David Rocher <rocher@mail.dotcom.fr>
+# Richard Nelson <cowboy@debain.org>
+
+# How often to run the queue
+Q="10m"
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/sendmail
+PIDFILE=/var/run/sendmail.pid
+NAME=sendmail
+FLAGS="defaults 50"
+
+test -x $DAEMON -a -f /etc/sendmail.cf || exit 0
+
+case "$1" in
+ start)
+ ( cd /var/spool/mqueue && rm -f [lnx]f* )
+ echo -n "Starting mail transport agent: sendmail"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -bd -q"$Q"
+ echo "."
+ ;;
+
+ stop)
+ echo -n "Stopping mail transport agent: sendmail"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+ echo "."
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ reload)
+ echo -n "Reloading sendmail configuration..."
+ start-stop-daemon --stop --signal 1 --quiet \
+ --pidfile $PIDFILE --exec $DAEMON
+ echo "done."
+ ;;
+
+ force-reload)
+ $0 reload
+ ;;
+
+ debug)
+ start-stop-daemon --stop --signal 10 --verbose \
+ --pidfile $PIDFILE --exec $DAEMON
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/sendmail {start|stop|restart|reload|force-reload|debug}"
+ exit 1
+ ;;
+esac
+
+exit 0