mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
inteno-netmodes: reload network when switched to repeater mode via WebGUI
This commit is contained in:
parent
f93d57d7f9
commit
ef8f558dd4
3 changed files with 9 additions and 2 deletions
|
|
@ -181,6 +181,8 @@ populate_netmodes() {
|
|||
|
||||
switch_netmode() {
|
||||
[ -f /etc/config/netmode -a -d $modedir ] || return
|
||||
|
||||
local netreload="$1"
|
||||
local curmode conf repeaterready old_mode
|
||||
|
||||
config_load netmode
|
||||
|
|
@ -237,7 +239,12 @@ switch_netmode() {
|
|||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
repeater*)
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
if [ -f /etc/init.d/omcproxy ]; then
|
||||
/etc/init.d/omcproxy stop
|
||||
fi
|
||||
if [ "$netreload" != "0" ]; then
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
|
@ -298,7 +305,7 @@ start_service() {
|
|||
}
|
||||
|
||||
reload_service() {
|
||||
switch_netmode
|
||||
switch_netmode "$1"
|
||||
|
||||
# set default JUCI page to overview
|
||||
uci -q set juci.juci.homepage="overview"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue