1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 19:11:51 +00:00
openmptcprouter-feeds/openmptcprouter/files/etc/uci-defaults/2091-omr-wifi

24 lines
660 B
Text
Raw Normal View History

2020-09-23 07:52:32 +00:00
#!/bin/sh
2021-07-12 16:06:41 +00:00
if [ "$(uci -q get wifi-iface.radio0)" != "" ] && [ "$(uci -q get wifi-iface.default_radio0.key)" = "12345678" ]; then
if [ "$(uci -q get wifi-device.radio0.country)" = "" ]; then
2020-09-23 07:52:32 +00:00
uci -q batch <<-EOF >/dev/null
2021-07-29 07:24:11 +00:00
set wifi-device.radio0.country='FR'
2021-07-12 16:06:41 +00:00
commit wifi-device
2020-09-23 07:52:32 +00:00
EOF
fi
2021-07-12 16:06:41 +00:00
if [ -n "$(uci -q get wifi-iface.radio0.network | grep lan)" ]; then
2020-09-23 07:52:32 +00:00
uci -q batch <<-EOF >/dev/null
2021-07-12 16:06:41 +00:00
set wifi-iface.default_radio0.network='wifi'
commit wifi-iface
EOF
fi
if [ -n "$(uci -q get wifi-device.radio0.cell_density)" ]; then
uci -q batch <<-EOF >/dev/null
delete wifi-device.radio0.cell_density
commit wifi-device
2020-09-23 07:52:32 +00:00
EOF
fi
fi
exit 0