linuxOS_D21X/source/artinchip/wifimanager/files/wifimanager.init
2024-11-29 16:33:21 +08:00

35 lines
514 B
Bash
Executable File

#!/bin/sh
WPA_SUPPLICANT="/etc/wifi/wpa_supplicant.conf"
SOCKETS="/var/run/wifidaemon"
start() {
printf "WifiManager starting..."
# start wpa_supplicant server
wpa_supplicant -iwlan0 -Dnl80211 -c $WPA_SUPPLICANT -O $SOCKETS -B
}
stop() {
printf "stop WifiManager"
killall wpa_supplicant
}
case "$1" in
start)
start
;;
stop)
stop;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac