#! /bin/sh -e
test -x /usr/bin/wlanwarn-usr || exit 0
case "$1" in
  start)
    echo -n "Starting wlanwarn daemon: "
    start-stop-daemon -S -b -a /usr/bin/wlanwarn-usr
    echo "wlanwarn-usr started."
    ;;
  stop)
    echo -n "Stopping wlanwarn-usr daemon: "
    start-stop-daemon -K -n wlanwarn-usr
    echo "wlanwarn-usr stopped."
    ;;
  restart|force-reload)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/wlanwarn-usr_start {start|stop|restart|force-reload}"
    exit 1
esac
exit 0
