From f9a8dfcd51e481a49355d94a3e74f2762519378f Mon Sep 17 00:00:00 2001 From: rhatto Date: Sun, 11 Feb 2007 14:29:54 +0000 Subject: changed repository layout to trunk/, tags/ and branches/ scheme git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@181 04377dda-e619-0410-9926-eae83683ac58 --- .../vserver-legacy.d/etc/rc.d/rc.sendmail | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 trunk/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail (limited to 'trunk/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail') diff --git a/trunk/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail b/trunk/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail new file mode 100644 index 0000000..1a31c52 --- /dev/null +++ b/trunk/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sendmail @@ -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 -- cgit v1.2.3