diff options
author | Nishant Limbachia <nishant@mnspace.net> | 2010-05-11 20:01:56 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:01:56 +0200 |
commit | 898b3ce8c9b4dedc1830ab83cf139d619ab8fcc7 (patch) | |
tree | edd2761be1e154ea7c98f22ca539d1425e3677d5 /system/clamsmtp/rc.clamsmtpd | |
parent | cc4bb035e088be5f70b558b9b334abc8c9cb338f (diff) | |
download | slackbuilds-898b3ce8c9b4dedc1830ab83cf139d619ab8fcc7.tar.gz |
system/clamsmtp: Added to 12.0 repository
Diffstat (limited to 'system/clamsmtp/rc.clamsmtpd')
-rw-r--r-- | system/clamsmtp/rc.clamsmtpd | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/system/clamsmtp/rc.clamsmtpd b/system/clamsmtp/rc.clamsmtpd new file mode 100644 index 0000000000..559eee4faf --- /dev/null +++ b/system/clamsmtp/rc.clamsmtpd @@ -0,0 +1,50 @@ +#!/bin/sh +# +# /etc/rc.d/rc.clamsmtpd +# +# start/stop/restart clamsmtp mail filter daemon +# +# To make clamsmtpd start automatically at boot, make this file executable: +# chmod 0755 /etc/rc.d/rc.clamsmtpd +# To edit the startup options, refer to "man 8 clamsmtpd" + +CONFIG="/etc/clamsmtpd.conf" +PIDFILE="/var/run/clamsmtpd.pid" + +clamsmtpd_start() { + echo "Starting clamsmtp daemon: /usr/sbin/clamsmtpd " + /usr/sbin/clamsmtpd -f $CONFIG -p $PIDFILE +} + +clamsmtpd_stop() { + if [ -f $PIDFILE ]; then + echo "Stopping clamsmtp daemon" + /bin/kill $(cat $PIDFILE) 2>/dev/null + else + echo "clamsmtpd doesn't seem to be running... exiting" + exit 1 + fi +} + +clamsmtpd_restart() { + clamsmtpd_stop + sleep 2 + clamsmtpd_start +} + +case "$1" in +'start') + clamsmtpd_start + ;; +'stop') + clamsmtpd_stop + ;; +'restart') + clamsmtpd_restart + ;; +'*') + echo "USAGE: $0 start|stop|restart" + exit 1 + ;; +esac + |