diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-03-01 20:44:17 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-03-01 20:44:17 +0100 |
commit | 194af840fa8a77f1e763b2089a3014aa2d56fb1d (patch) | |
tree | a18e74c2daaf7c1b3530b6acfd81f59dc6eb1404 /amavisd-new/amavisd | |
parent | 669802590369b3f606079f0c5192752bd97f0497 (diff) | |
download | aur-packages-194af840fa8a77f1e763b2089a3014aa2d56fb1d.tar.gz aur-packages-194af840fa8a77f1e763b2089a3014aa2d56fb1d.tar.xz |
update
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'amavisd-new/amavisd')
-rw-r--r-- | amavisd-new/amavisd | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/amavisd-new/amavisd b/amavisd-new/amavisd new file mode 100644 index 0000000..3061535 --- /dev/null +++ b/amavisd-new/amavisd @@ -0,0 +1,77 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +DAEMON_CONF="/etc/amavisd/amavisd.conf" + +PID=`pidof -o %PPID amavisd` + +case "$1" in + + start) + + stat_busy "Starting amavisd" + + [ -z "$PID" ] && /usr/sbin/amavisd -c ${DAEMON_CONF} &> /dev/null + + if [ $? -gt 0 ]; then + + stat_fail + + else + + add_daemon amavisd + + stat_done + + fi + + ;; + + stop) + + stat_busy "Stopping amavisd" + + [ ! -z "$PID" ] && kill $PID &> /dev/null + + if [ $? -gt 0 ]; then + + stat_fail + + else + + rm_daemon amavisd + stat_done + + fi + + ;; + + restart) + + $0 stop + + sleep 3 + + $0 start + + ;; + + reload) + + stat_busy "Reloading amavisd" + + /usr/sbin/amavisd -c ${DAEMON_CONF} reload + + stat_done + + ;; + + *) + echo "usage: $0 {start|stop|restart|reload}" + ;; + +esac + +exit 0 |