-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·38 lines (32 loc) · 782 Bytes
/
init.sh
File metadata and controls
executable file
·38 lines (32 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
### BEGIN INIT INFO
# Provides: pycomm
# Required-Start:
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Provide basic Web service to list community events.
# Description: Provide basic Web service to list community events.
### END INIT INFO
S=pycomm
USER=ygingras
PSERVE="/home/$USER/.virtualenvs/$S/bin/pserve"
PIDFILE="/var/run/$S/$S.pid"
LOGFILE="/var/log/$S/$S.log"
OPTS="--daemon --pid-file=$PIDFILE --log-file=$LOGFILE --user=$USER"
CONF="/home/$USER/$S/development.ini"
set -e
case "$1" in
start)
exec $PSERVE $OPTS $CONF
;;
stop|restart|status)
exec $PSERVE $OPTS $CONF $1
;;
*)
echo "Usage: $S {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0