igor@126: #!/bin/sh
igor@126: 
igor@126: L3_PATH="/usr/bin/"
igor@126: L3_BACKEND="./l3-backend"
igor@126: 
igor@126: case "$1" in
igor@126:   start)
igor@126:     cd ${L3_PATH}
igor@126:     nohup ${L3_BACKEND} > /dev/null 2>&1 &
igor@126:     ;;
igor@126:   stop)
igor@126:     l3_backend_pid=`ps waux | grep -v grep | grep 'l3.backend' | awk '{print $2;}'`
igor@126:     if [ -z "$l3_backend_pid" ]
igor@126:     then
igor@126:         echo "l3-backend is not running"
igor@126:     else
igor@126:         kill ${mywi_pid}
igor@126:     fi
igor@126:     ;;
igor@126:   restart|reload)
igor@126:     $0 stop && $0 start
igor@126:     ;;
igor@126:   stop|reload|restart|force-reload)
igor@126:     ;;
igor@126:   *)
igor@126:     echo "Usage: $N {start|stop|restart|force-reload}" >&2
igor@126:     exit 1
igor@126:     ;;
igor@126: esac
igor@126: 
igor@126: exit 0
igor@126: