Commit cc4c66bf by e0d

removing old template

parent 412d119b
#!/bin/sh
### BEGIN INIT INFO
# Provides: seismic_web
# Required-Start: $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Gunicorn processes for seismic_web
### END INIT INFO
# www-data is the default www user on debian
USER=forums
NAME="cs_comments_service"
RETVAL=0
DAEMON=/opt/www/.rbenv/versions/1.9.3-p374/bin/ruby
PID=/var/tmp/cs_comments_service.pid
OPTIONS="app.rb"
# source function library
. /lib/lsb/init-functions
start()
{
echo "Starting $NAME."
cd /opt/wwc/cs_comments_service
start-stop-daemon -b --start --pidfile $PID -m -c $USER --exec $DAEMON -- $OPTIONS
}
stop()
{
if [ -f $PID ]; then
echo "Stopping $NAME"
kill $(cat $PID)
fi
}
reload()
{
echo "Reloading $NAME:"
if [ -f $PID ]
then kill -HUP `cat $PID` && echo "OK" || echo "failed";
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
reload
;;
reload)
reload
;;
force-reload)
stop && start
;;
*)
echo "Usage: $0 {start|stop|restart}"
RETVAL=1
esac
exit $RETVAL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment