packages/net/dcwapd/files/dcwapd.init.d
Carey Sonsino 82a2e3f55f dcwifi: Add Dual Channel Wi-Fi component packages
dcstad: Dual Channel Wi-Fi Station Daemon
dcwapd: Dual Channel Wi-Fi Access Point Daemon
libdcwproto: Dual Channel Wi-Fi Protocol Library
libdcwsocket: Dual Channel Wi-Fi Socket Library
macremapper: MAC Address Remapper Linux Kernel Module
mrmctl: Userland tool to get/set remap rules

Signed-off-by: Carey Sonsino <careys@edgewaterwireless.com>
Signed-off-by: Carey Sonsino <csonsino@gmail.com>
2019-10-16 16:55:38 +00:00

31 lines
664 B
Bash
Executable file

#!/bin/sh /etc/rc.common
START=99
# Setting the stop value makes the restart script unreliable when invoked by LuCI
#STOP=0
scriptdir=/etc/dcwapd
#validate_section_dcwapd() {
# uci_validate_section dcwapd general "${1}" \
# 'enabled:bool:1'
#}
start() {
# validate_section_dcwapd dcwapd
# only run the start script if the enabled uci option is set properly
enabled=$(uci get dcwapd.general.enabled)
if [ "${enabled}" = "1" ]; then
${scriptdir}/start_dcwapd.sh
else
echo "dcwapd is disabled in UCI"
return 1
fi
}
stop() {
${scriptdir}/stop_dcwapd.sh
# Add a sleep after stopping because an immediate restat will fail otherwise
sleep 1
}