bc12461afe
KPI - Time from Request to Action Completion
27 lines
531 B
Bash
Executable File
27 lines
531 B
Bash
Executable File
#!/bin/bash
|
|
|
|
WORKDIR=/srv/www/stacktach/app
|
|
DAEMON=/usr/bin/python
|
|
ARGS=$WORKDIR/worker/start_workers.py
|
|
PIDFILE=/var/run/stacktach.pid
|
|
|
|
export DJANGO_SETTINGS_MODULE="settings"
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting server"
|
|
cd $WORKDIR
|
|
/sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS
|
|
;;
|
|
stop)
|
|
echo "Stopping server"
|
|
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
|
|
;;
|
|
*)
|
|
echo "Usage: stacktach.sh {start|stop}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|