testnet: control broadband led if wan led is not available

WAN and Broadband LED will be handled by ruleng rules when ubus switch events are ready
This commit is contained in:
Sukru Senli 2020-05-01 15:09:00 +02:00
parent e4221b84f0
commit c92d47953e

View file

@ -32,9 +32,9 @@ test_connection() {
uplink_test() { uplink_test() {
uplink_phy_connected uplink_phy_connected
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
ubus call led.wan set '{"state" : "ok"}' ubus call led.wan set '{"state" : "ok"}' || ubus call led.broadband set '{"state" : "ok"}'
else else
ubus call led.wan set '{"state" : "off"}' ubus call led.wan set '{"state" : "off"}' || ubus call led.broadband set '{"state" : "off"}'
fi fi
} }
@ -70,8 +70,6 @@ connectivity_test() {
[ "$CURSTATUS" == "$LASTSTATUS" ] || ubus send internet '{"status" : "offline"}' [ "$CURSTATUS" == "$LASTSTATUS" ] || ubus send internet '{"status" : "offline"}'
LASTSTATUS=0 LASTSTATUS=0
fi fi
iptv_test
} }
if [ "$1" == "once" ]; then if [ "$1" == "once" ]; then