lilalo
view initd-l3-backend @ 158:d775ffd49dbf
minifix: bsd/darwin in uname
author | Igor Chubin <igor@chub.in> |
---|---|
date | Wed Feb 01 17:14:54 2012 +0200 (2012-02-01) |
parents | |
children |
line source
1 #!/bin/sh
3 L3_PATH="/usr/bin/"
4 L3_BACKEND="./l3-backend"
6 case "$1" in
7 start)
8 cd ${L3_PATH}
9 nohup ${L3_BACKEND} > /dev/null 2>&1 &
10 ;;
11 stop)
12 l3_backend_pid=`ps waux | grep -v grep | grep 'l3.backend' | awk '{print $2;}'`
13 if [ -z "$l3_backend_pid" ]
14 then
15 echo "l3-backend is not running"
16 else
17 kill ${mywi_pid}
18 fi
19 ;;
20 restart|reload)
21 $0 stop && $0 start
22 ;;
23 stop|reload|restart|force-reload)
24 ;;
25 *)
26 echo "Usage: $N {start|stop|restart|force-reload}" >&2
27 exit 1
28 ;;
29 esac
31 exit 0