start/stop stunnel
[cloudstore.git] / init.d / _start_stop
1 _start_stop() {
2
3 case $1 in
4         start)
5                 cd /srv/cloudstore && ( $DAEMON 2>&1 ) > /tmp/$NAME.log &
6                 echo $! > /tmp/$NAME.pid
7                 ;;
8         stop)  
9                 kill `cat /tmp/$NAME.pid` ;;
10         *)  
11                 echo "usage: $0 {start|stop}" ;;
12         esac
13 exit 0
14
15 }