41 lines
480 B
Bash
Executable File
41 lines
480 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DESC="WIFI init scripts"
|
|
WIFI_POWERCTL=/oem/usr/bin/wifipowerctl
|
|
USB_MUXCTL=/oem/usr/bin/usbmuxctl
|
|
|
|
|
|
start() {
|
|
printf "init wifi device "
|
|
$WIFI_POWERCTL poweron
|
|
$USB_MUXCTL external
|
|
}
|
|
|
|
stop() {
|
|
printf "disable wifi device"
|
|
$WIFI_POWERCTL poweroff
|
|
$USB_MUXCTL internal
|
|
}
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|