usbwifi 731 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  3. DAEMON=/usr/share/usbwifi/conf/start.sh
  4. PIDFILE=/var/run/usbwifi.pid
  5. test -x $DAEMON || exit 0
  6. . /lib/lsb/init-functions
  7. case "$1" in
  8. start)
  9. log_daemon_msg "Starting usbwifi"
  10. start_daemon -p $PIDFILE $DAEMON
  11. log_end_msg $?
  12. ;;
  13. stop)
  14. log_daemon_msg "Stopping usbwifi"
  15. killproc -p $PIDFILE $DAEMON
  16. PID=`ps x |grep feed | head -1 | awk '{print $1}'`
  17. kill -9 $PID
  18. log_end_msg $?
  19. ;;
  20. force-reload|restart)
  21. $0 stop
  22. $0 start
  23. ;;
  24. status)
  25. status_of_proc -p $PIDFILE $DAEMON atd && exit 0 || exit $?
  26. ;;
  27. *)
  28. echo "Usage: /etc/init.d/usbwifi {start|stop|restart|force-reload|status}"
  29. exit 1
  30. ;;
  31. esac
  32. exit 0