updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / uwsgi / uwsgid.sh
blob0dc59ff5cf5dc0acbda77777bf8f41a38b4607de
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 . /etc/conf.d/uwsgid
8 case "$1" in
9 start)
10 stat_busy "Starting uwsgid"
11 /usr/bin/uwsgi --daemonize "$UWSGI_DAEMONIZE" --ini "$UWSGI_INI" --pidfile "$UWSGI_PIDFILE" &>/dev/null
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon uwsgid
16 stat_done
19 stop)
20 stat_busy "Stopping uwsgid"
21 kill -QUIT `cat "$UWSGI_PIDFILE"` &>/dev/null
22 if [ $? -ne 0 ]; then
23 stat_fail
24 else
25 rm_daemon uwsgid
26 stat_done
29 restart)
30 $0 stop
31 sleep 1
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
38 exit 0