]> git.donarmstrong.com Git - deb_pkgs/spamass-milter.git/commitdiff
add moving pidfile and initscript support
authordon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Fri, 13 Oct 2006 23:06:12 +0000 (23:06 +0000)
committerdon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Fri, 13 Oct 2006 23:06:12 +0000 (23:06 +0000)
debian/spamass-milter.default
debian/spamass-milter.init

index c4cd67cb4b4cd35dfdb733072c11aab784a0dd57..85cfd62daa1331c0fa586cd16408ed06ba4a4192 100644 (file)
@@ -13,6 +13,7 @@ OPTIONS="-u nobody -i 127.0.0.1"
 # Do not modify Subject:, Content-Type: or body.
 #OPTIONS="-m"
 
-# If you are using postfix, you may want to use the following
-# SOCKET="/var/spool/postfix/spamass.sock"
-# RUNAS="postfix"
\ No newline at end of file
+# If you are using postfix, you probably want to uncomment the following
+# SOCKET="/var/spool/postfix/spamass/spamass.sock"
+# RUNAS="postfix"
+# PIDFILE="/var/spool/postfix/spamass/spamass.pid"
\ No newline at end of file
index a262c2d2283dc820aa4b1d5dbe567e18908529c2..deb05e685b1442224f90c0096fd3c8edc635ebef 100644 (file)
@@ -60,6 +60,15 @@ case "$1" in
 
        if [ ! -d $(dirname $SOCKET) ]; then
            mkdir -p $(dirname $SOCKET);
+           if [ -n "$RUNAS" ]; then
+               chown "$RUNAS" $(dirname $SOCKET);
+           fi;
+       fi;
+       if [ ! -d $(dirname $PIDFILE) ]; then
+           mkdir -p $(dirname $PIDFILE);
+           if [ -n "$RUNAS" ]; then
+               chown "$RUNAS" $(dirname $PIDFILE);
+           fi;
        fi;
        start-stop-daemon --start -p $PIDFILE $CHUID --exec $DAEMON -- -P $PIDFILE -f -p $SOCKET $OPTIONS