]> git.pld-linux.org Git - packages/amavisd.git/commitdiff
8cc59171dac3e21d7b6e6d17dbcab152 amavisd-snapshot-20010714.tar.gz
authorundefine <undefine@pld-linux.org>
Sun, 20 Jan 2002 14:23:33 +0000 (14:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
init script... ugly, but i can't find better idea

Changed files:
    amavisd.init -> 1.1

amavisd.init [new file with mode: 0755]

diff --git a/amavisd.init b/amavisd.init
new file mode 100755 (executable)
index 0000000..8d058f0
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# amavisd              Start/Stop the amavisd daemon.
+#
+# chkconfig:   345 40 60
+#
+# description: amavisd is daemonized antivirus daemon
+#
+# processname: amavisd
+# config:      /etc/amavisd.conf
+# pidfile:     /var/lock/subsys/amavisd
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/amavisd ] && . /etc/sysconfig/amavisd
+
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/amavisd ]; then
+               msg_starting Amavisd
+               daemon su - amavis -c "/usr/sbin/amavisd"
+               chmod a+w /var/run/amavisd/amavisd.sock
+               touch /var/lock/subsys/amavisd
+       else
+               msg_Already_Running Amavisd
+               exit 1
+       fi
+       ;;
+  stop)
+        # Stop daemons.
+        if [ -f /var/lock/subsys/amavisd ]; then
+                msg_stopping Amavisd 
+               killproc amavisd;
+                rm -f /var/lock/subsys/amavisd >/dev/null 2>&1
+        else
+                msg_Not_Running Amavisd
+                exit 1
+        fi
+       ;;
+  status)
+       status amavisd
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  *)
+       msg_Usage: "$0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.106384 seconds and 4 git commands to generate.