Files
wlan-ap/feeds/tip/maverick/files/usr/libexec/ucentral/maverick.sh
John Crispin 4f20c642a5 ucentral: development update
* fix ath11k reload issue
* drop patches that were used by data mode v0
* imporve maverick logging
* fix lldp on qca units

Signed-off-by: John Crispin <john@phrozen.org>
2021-06-05 15:40:11 +02:00

35 lines
654 B
Bash
Executable File

#!/bin/sh
active=$(ubus call ucentral status | jsonfilter -e '@.active')
[ -n "$active" -a ! "$active" -eq 1 ] && {
logger maverick: all good
exit 0
}
logger maverick: entering failsafe
rm /etc/config/network /etc/config/wireless
cp /rom/etc/config/uhttpd /rom/etc/config/firewall /rom/etc/config/dhcp /rom/etc/config/dropbear /etc/config
config_generate
wifi config
. /lib/functions.sh
radio_enable() {
uci set wireless.$1.disabled=0
}
ssid_set() {
uci set wireless.$1.ssid='Maverick'
}
config_load wireless
config_foreach radio_enable wifi-device
config_foreach ssid_set wifi-iface
uci commit
/etc/init.d/ucentral stop
reload_config