]> git.pld-linux.org Git - packages/inn.git/commitdiff
- get rid of setsid, su and other hacks, allow to start innwatch when news
authorPaweł Gołaszewski <blues@pld-linux.org>
Wed, 20 Aug 2008 13:39:54 +0000 (13:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  user has /bin/false.

Changed files:
    inn.init -> 1.28

inn.init

index e7b8eb4f1ec4e893180efa9ed046e3cbdb1007dd..951c8f59e172100e7627911c93c2133dd0c16f3e 100644 (file)
--- a/inn.init
+++ b/inn.init
@@ -32,29 +32,19 @@ start() {
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
                        msg_starting "INN ovdb_monitor"
-                       su news -c ovdb_init 2>&1 > /dev/null
-                       ok
+                       daemon --user news ovdb_init
                fi
 
                msg_starting "INN"
                daemon --user=news inndstart
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
                if is_yes "$DOINNWATCH" ; then
                        msg_starting "INN Watch"
                        busy
-                       su news -c "umask 002
-                       /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
+                       daemon --fork --user news /usr/bin/innwatch
                        RETVAL=$?
                        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
-                       ps -C innwatch >/dev/null 2>&1 || usleep 500000
-                       if [ $RETVAL -eq 0 ] && ps -C innwatch >/dev/null 2>&1; then
-                               ok
-                               touch /var/lock/subsys/inn
-                       else
-                               RETVAL=1
-                               fail
-                       fi
-               else
-                       touch /var/lock/subsys/inn
                fi
        else
                msg_already_running "INN"
@@ -117,6 +107,7 @@ case "$1" in
        stop
        ;;
   status)
+       status innwatch
        status innd
        if [ $? -eq 0 ]; then
                innstat
This page took 0.13393 seconds and 4 git commands to generate.