wok-6.x rev 15183

cherokee: new init script
author Richard Dunbar <mojo@slitaz.org>
date Wed Aug 21 14:06:05 2013 +0000 (2013-08-21)
parents 92c944abb6f5
children 60564f86c380
files cherokee/stuff/cherokee
line diff
     1.1 --- a/cherokee/stuff/cherokee	Wed Aug 21 18:41:33 2013 +0000
     1.2 +++ b/cherokee/stuff/cherokee	Wed Aug 21 14:06:05 2013 +0000
     1.3 @@ -19,7 +19,7 @@
     1.4        exit 1
     1.5      fi
     1.6      echo -n "Starting $DESC: $NAME... "
     1.7 -    $DAEMON $OPTIONS -k start 
     1.8 +    $DAEMON $OPTIONS -d &>/dev/null  
     1.9      status
    1.10      ;;
    1.11    stop)
    1.12 @@ -28,17 +28,7 @@
    1.13        exit 1
    1.14      fi
    1.15      echo -n "Stopping $DESC: $NAME... "
    1.16 -    $DAEMON $OPTION -k stop
    1.17 -    rm $PIDFILE
    1.18 -    status
    1.19 -    ;;
    1.20 -  reload)
    1.21 -    if ! active_pidfile $PIDFILE cherokee ; then
    1.22 -      echo "$NAME is not running."
    1.23 -      exit 1
    1.24 -    fi
    1.25 -    echo -n "Stopping $DESC: $NAME... "
    1.26 -    $DAEMON $OPTION -k graceful
    1.27 +    kill $(cat $PIDFILE)
    1.28      status
    1.29      ;;
    1.30    restart)
    1.31 @@ -47,7 +37,10 @@
    1.32        exit 1
    1.33      fi
    1.34      echo -n "Restarting $DESC: $NAME... "
    1.35 -    $DAEMON $OPTIONS -k restart
    1.36 +    kill $(cat $PIDFILE)
    1.37 +    rm $PIDFILE
    1.38 +    sleep 2
    1.39 +    $DAEMON $OPTIONS -d &>/dev/null
    1.40      status
    1.41      ;;
    1.42    *)