1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/bin/sh
- PATH=/bin:/usr/bin:/sbin:/usr/sbin
- DAEMON=/usr/share/usbwifi/conf/start.sh
- PIDFILE=/var/run/usbwifi.pid
- test -x $DAEMON || exit 0
- . /lib/lsb/init-functions
- case "$1" in
- start)
- log_daemon_msg "Starting usbwifi"
- start_daemon -p $PIDFILE $DAEMON
- log_end_msg $?
- ;;
- stop)
- log_daemon_msg "Stopping usbwifi"
- killproc -p $PIDFILE $DAEMON
- PID=`ps x |grep feed | head -1 | awk '{print $1}'`
- kill -9 $PID
- log_end_msg $?
- ;;
- force-reload|restart)
- $0 stop
- $0 start
- ;;
- status)
- status_of_proc -p $PIDFILE $DAEMON atd && exit 0 || exit $?
- ;;
- *)
- echo "Usage: /etc/init.d/usbwifi {start|stop|restart|force-reload|status}"
- exit 1
- ;;
- esac
- exit 0
|