SmartAudio/package/allwinner/wifimanager/files/wifi_daemon.init

30 lines
509 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=88
STOP=99
DEPEND=boot
USE_PROCD=1
PROG=/bin/wifi_daemon
OOM_ADJ=-17
start_service() {
procd_open_instance
procd_set_param command $PROG
procd_close_instance
}
stop_service() {
da=`ps | grep wifi_daemon | grep -v grep`
[ -n "$da" ] && {
killall wifi_daemon
sleep 1
}
wpa=`ps | grep wpa_supplicant | grep -v grep`
[ -n "$wpa" ] && {
killall wpa_supplicant
sleep 1
}
ifconfig wlan0 down
}