Changeset - 41504f4aa96b
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-08-27 14:56:52
marcin@python-works.com
fixed init scripts
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
hg_app_daemon
Show inline comments
 
@@ -24,26 +24,26 @@ DAEMON_OPTS="serve --daemon \
 
--pid-file=$PID_PATH \
 
--log-file=$LOG_PATH  $APP_PATH/$CONF_NAME"
 

	
 
#extra options
 
opts="${opts} restartdelay"
 

	
 
depend() {
 
    need nginx
 
}
 

	
 
start() {
 
    ebegin "Starting $APP_NAME"
 
    cd $APP_PATH
 
    start-stop-daemon --start --quiet\
 
    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 \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
hg_app_daemon2
Show inline comments
 
@@ -29,26 +29,26 @@ RUN_AS="marcink"
 
DAEMON="$PYTHON_PATH/bin/paster"
 

	
 
DAEMON_OPTS="serve --daemon \
 
--user=$RUN_AS \
 
--group=$RUN_AS \
 
--pid-file=$PID_PATH \
 
--log-file=$LOG_PATH  $APP_PATH/$CONF_NAME"
 

	
 

	
 
case "$1" in
 
  start)
 
    echo "Starting $APP_NAME"
 
    cd $APP_PATH
 
    start-stop-daemon --start --quiet\
 
    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 \
 
        --pidfile $PID_PATH || echo "$APP_NAME - Not running!"
 
    if [ -f $PID_PATH ]; then
 
        rm $PID_PATH
 
    fi
 
    ;;
0 comments (0 inline, 0 general)