Skip to content
Snippets Groups Projects
Commit aa8c15de authored by Sukru Senli's avatar Sukru Senli
Browse files

lq-wave: remove imonitor rule for restarting wifi

parent 43c30d20
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
. /lib/functions.sh
add_imonitor_hostapd_rule() {
uci -q get imonitor.hostapd || {
uci -q set imonitor.hostapd="monitor"
uci -q set imonitor.hostapd.app="wifimon"
uci -q set imonitor.hostapd.test="[ \$((\$(uci show wireless | grep wireless.wlan.*htmode | wc -l)-\$(uci show wireless | grep wireless.wlan.*disabled=.*1 | wc -l))) -ne \"\$(pidof hostapd | wc -w)\" -a -z \"\$(uci show wireless | grep wireless.@wifi-iface.*disabled=.*1)\" ] && echo crashed"
uci -q set imonitor.hostapd.stream="stdout"
uci -q set imonitor.hostapd.string_match="crashed"
uci -q set imonitor.hostapd.execute="logger -t \"imonitor\" \"Restarting WiFi\" && wifi &"
uci -q set imonitor.hostapd.interval="2"
uci -q set imonitor.hostapd.nr_tests="2"
uci commit imonitor
}
}
add_imonitor_hostapd_rule
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment