]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - www/webapp.init
Add initscript for webapp.
[people/shoehn/ipfire.org.git] / www / webapp.init
CommitLineData
7a5b97a0
MT
1#!/bin/bash
2
3HOMEDIR=$(dirname $(readlink $0))
4LOGFILE=/srv/logs/www/webapp.error.log
5
6case "$1" in
7 start)
8 cd ${HOMEDIR} && ./webapp.py >>${LOGFILE} 2>&1 &
9 ;;
10
11 stop)
12 killall webapp.py
13 ;;
14
15 restart)
16 $0 stop
17 sleep 2
18 $0 start
19 ;;
20
21 check)
22 if (ps aux | grep -q webapp.py); then
23 : # Process is running...
24 else
25 $0 restart
26 fi
27 ;;
28esac