adjust touch target on mobile Feature page
[people/shoehn/ipfire.org.git] / webapp.init
1 #!/bin/bash
2
3 HOMEDIR=$(dirname $(readlink $0))
4 LOGFILE=/var/log/webapp/error.log
5
6 case "$1" in
7         start)
8                 if ps ax | grep -v grep | grep webapp.py > /dev/null
9                 then
10                 echo "webapp is allready running..."
11         else
12                         echo "Starting webapp..."
13                         cd ${HOMEDIR} && ./webapp.py >>${LOGFILE} 2>&1 &
14                 fi
15                 ;;
16
17         stop)
18                 if ps ax | grep -v grep | grep webapp.py > /dev/null
19                 then
20                         echo "Stopping webapp..."
21                         killall webapp.py &> /dev/null
22         else
23                         echo "webapp is not running..."
24                 fi
25                 ;;
26
27         restart)
28                 $0 stop
29                 sleep 2
30                 $0 start
31                 ;;
32
33         check)
34                 if ps ax | grep -v grep | grep webapp.py > /dev/null
35                         then
36                 :
37 #               echo "webapp is running..."
38                 else
39                         echo "webapp is not running!" 
40                         $0 start
41                 fi
42                 ;;
43                 
44                 *)
45                 echo "usage: webapp [ start | stop | restart | check ]"
46                 ;;
47                 
48 esac