Changeset - ccbb7ea2b203
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-08-27 15:25:23
marcin@python-works.com
another bugfix to init scripts
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
hg_app_daemon
Show inline comments
 
@@ -34,25 +34,26 @@ depend() {
 
start() {
 
    ebegin "Starting $APP_NAME"
 
    start-stop-daemon -d $APP_PATH -e PYTHON_EGG_CACHE="/tmp" \
 
        --start --quiet\
 
        --pidfile $PID_PATH \
 
        --user $RUN_AS \
 
        --exec $DAEMON -- $DAEMON_OPTS
 
    eend $?
 
}
 

	
 
stop() {
 
    ebegin "Stopping $APP_NAME"
 
    start-stop-daemon --stop --quiet \
 
    start-stop-daemon -d $APP_PATH \
 
        --stop --quiet \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
 
    fi
 
    eend $?
 
}
 

	
 
restartdelay() {
 
    #stop()
 
    echo "sleep3"
 
    sleep 3
 
    
hg_app_daemon2
Show inline comments
 
@@ -36,26 +36,27 @@ DAEMON_OPTS="serve --daemon \
 

	
 

	
 
case "$1" in
 
  start)
 
    echo "Starting $APP_NAME"
 
    start-stop-daemon -d $APP_PATH -e PYTHON_EGG_CACHE="/tmp" \
 
        --start --quiet\
 
        --pidfile $PID_PATH \
 
        --user $RUN_AS \
 
        --exec $DAEMON -- $DAEMON_OPTS
 
    ;;
 
  stop)
 
    echo "Stopping $APP_NAME"
 
    start-stop-daemon --stop --quiet \
 
    ebegin "Stopping $APP_NAME"
 
    start-stop-daemon -d $APP_PATH \
 
        --stop --quiet \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
 
    fi
 
    ;;
 
  restart)
 
    echo "Restarting $APP_NAME"
 
    #stop
 
    start-stop-daemon --stop --quiet \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
0 comments (0 inline, 0 general)