Ré-organisatrion stage3 et stage5 comme les stages 0 à 2
[hvlinux.git] / stage5 / bootscripts / milter-greylist
diff --git a/stage5/bootscripts/milter-greylist b/stage5/bootscripts/milter-greylist
new file mode 100755 (executable)
index 0000000..a771554
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# milter-greylist
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+prog="Milter-Greylist"
+
+pidfile="/var/run/milter-greylist/milter-greylist.pid"
+socket="/var/run/milter-greylist/milter-greylist.sock"
+OPTIONS="-P $pidfile -p $socket -v"
+
+if [ -f /etc/sysconfig/milter-greylist ]; then
+    . /etc/sysconfig/milter-greylist
+fi
+
+case "$1" in
+    start)
+       cmd_run_log_box_warn "Starting $prog" loadproc /usr/bin/milter-greylist ${OPTIONS}
+        touch /var/lock/subsys/milter-greylist
+        ;;
+
+    stop)
+       cmd_run_log_box_warn "Stopping $prog" killproc /usr/bin/milter-greylist
+        rm -f /var/lock/subsys/milter-greylist
+        ;;
+
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+    
+    status)
+        statusproc milter-greylist
+        ;;
+    
+    *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?