##// END OF EJS Templates
Adding the context bar too all pages related to a Repository....
Adding the context bar too all pages related to a Repository. Deleted top menu items that are on the context bar already.

File last commit:

r3225:f9540f9c beta
r3527:87c97fce beta
Show More
rhodecode-daemon2
89 lines | 1.7 KiB | text/plain | TextLexer
removed egg info, update files for distutils build...
r552 #!/bin/sh -e
########################################
simplified example init.d script
r1262 #### THIS IS A DEBIAN INIT.D SCRIPT ####
removed egg info, update files for distutils build...
r552 ########################################
little improvements for debian init.d script
r3225
removed egg info, update files for distutils build...
r552 ### BEGIN INIT INFO
# Provides: rhodecode
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of rhodecode
# Description: starts instance of rhodecode using start-stop-daemon
### END INIT INFO
little improvements for debian init.d script
r3225
removed egg info, update files for distutils build...
r552 APP_NAME="rhodecode"
little improvements for debian init.d script
r3225 APP_HOMEDIR="opt"
APP_PATH="/$APP_HOMEDIR/$APP_NAME"
removed egg info, update files for distutils build...
r552 CONF_NAME="production.ini"
little improvements for debian init.d script
r3225
removed egg info, update files for distutils build...
r552 PID_PATH="$APP_PATH/$APP_NAME.pid"
LOG_PATH="$APP_PATH/$APP_NAME.log"
little improvements for debian init.d script
r3225
PYTHON_PATH="/$APP_HOMEDIR/$APP_NAME-venv"
RUN_AS="root"
removed egg info, update files for distutils build...
r552 DAEMON="$PYTHON_PATH/bin/paster"
little improvements for debian init.d script
r3225
removed egg info, update files for distutils build...
r552 DAEMON_OPTS="serve --daemon \
little improvements for debian init.d script
r3225 --user=$RUN_AS \
--group=$RUN_AS \
--pid-file=$PID_PATH \
--log-file=$LOG_PATH $APP_PATH/$CONF_NAME"
simplified example init.d script
r1262 start() {
echo "Starting $APP_NAME"
PYTHON_EGG_CACHE="/tmp" start-stop-daemon -d $APP_PATH \
--start --quiet \
--pidfile $PID_PATH \
--user $RUN_AS \
--exec $DAEMON -- $DAEMON_OPTS
}
little improvements for debian init.d script
r3225
simplified example init.d script
r1262 stop() {
echo "Stopping $APP_NAME"
start-stop-daemon -d $APP_PATH \
--stop --quiet \
--pidfile $PID_PATH || echo "$APP_NAME - Not running!"
little improvements for debian init.d script
r3225
simplified example init.d script
r1262 if [ -f $PID_PATH ]; then
rm $PID_PATH
fi
}
little improvements for debian init.d script
r3225
status() {
echo -n "Checking status of $APP_NAME ... "
pid=`cat $PID_PATH`
status=`ps ax | grep $pid | grep -ve grep`
if [ "$?" -eq 0 ]; then
echo "running"
else
echo "NOT running"
fi
}
removed egg info, update files for distutils build...
r552 case "$1" in
little improvements for debian init.d script
r3225 status)
status
;;
removed egg info, update files for distutils build...
r552 start)
simplified example init.d script
r1262 start
removed egg info, update files for distutils build...
r552 ;;
stop)
simplified example init.d script
r1262 stop
removed egg info, update files for distutils build...
r552 ;;
restart)
echo "Restarting $APP_NAME"
### stop ###
simplified example init.d script
r1262 stop
wait
removed egg info, update files for distutils build...
r552 ### start ###
simplified example init.d script
r1262 start
removed egg info, update files for distutils build...
r552 ;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
little improvements for debian init.d script
r3225 esac