source: subversion/sites/other/tilesAtHome_tahngo/Tools/startstop_tahngo @ 9859

Last change on this file since 9859 was 9356, checked in by spaetz, 12 years ago

add django fastcgi starter

  • Property svn:executable set to *
File size: 664 bytes
Line 
1#! /bin/bash
2
3WD=/var/www/tah
4PIDFILE=${WD}/var/tahngo.pid
5PYTHON=/usr/bin/python
6PYTH_PATH=/home/spaetz/django-trunk
7SOCKET=/var/www/tah/var/tahngo.sock
8#maxrequests=5000
9case "$1" in
10        start)
11                export PYTHONPATH=$PYTH_PATH
12                $WD/manage.py runfcgi socket=$SOCKET daemonize=true method=prefork pidfile=$PIDFILE
13                sleep 3
14                chmod a+rwx $SOCKET
15                ;;
16
17        stop)
18                kill `cat $PIDFILE`
19                ;;
20
21        restart)
22                $0 stop && $0 start
23                ;;
24
25        *)
26                echo "Usage: $0 {start|stop|restart}"
27                ;;
28esac
29exit 0
Note: See TracBrowser for help on using the repository browser.