]> git.donarmstrong.com Git - deb_pkgs/spamass-milter.git/blobdiff - debian/spamass-milter.init
do not remove the socket if spamass milter is already running
[deb_pkgs/spamass-milter.git] / debian / spamass-milter.init
index 68d423216a7b5b0b54ab87754a87a18373136fba..b94fd43e70339048e9bb642dfbfce22b91f26cc3 100644 (file)
@@ -36,8 +36,8 @@
 
 ### BEGIN INIT INFO
 # Provides:          spamass-milter
-# Required-Start:    $syslog $local_fs
-# Required-Stop:     $syslog $local_fs
+# Required-Start:    $syslog $local_fs $remote_fs
+# Required-Stop:     $syslog $local_fs $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: milter for spamassassin
@@ -90,6 +90,10 @@ fi;
 set -e
 
 start() {
+    if status; then
+        echo "$NAME is already running";
+        exit 1;
+    fi;
     # Because the default socket is in the same location as the
     # pidfile, we create them in this order.
     for DIR in "$(dirname $PIDFILE)" "$(dirname $SOCKET)"; do