diff --git a/omr-tracker/files/bin/omr-tracker-server b/omr-tracker/files/bin/omr-tracker-server index 13ed85a591..474f2f7b8b 100755 --- a/omr-tracker/files/bin/omr-tracker-server +++ b/omr-tracker/files/bin/omr-tracker-server @@ -221,6 +221,10 @@ _check_master() { add_list openvpn.omr.remote="$ip" EOF fi + uci -q batch <<-EOF >/dev/null + set openmptcprouter.${name}.current='1' + commit openmptcprouter + EOF if [ "$count" -eq "0" ]; then config_load openmptcprouter config_foreach _disable_current server @@ -248,8 +252,6 @@ _check_master() { del openvpn.omr.remote add_list openvpn.omr.remote="$ip" commit openvpn - set openmptcprouter.${name}.current='1' - commit openmptcprouter EOF /etc/init.d/openmptcprouter-vps get_openvpn_key "$name" >/dev/null 2>/dev/null #/etc/init.d/openmptcprouter-vps restart >/dev/null 2>/dev/null @@ -421,6 +423,10 @@ _check_backup() { set shadowsocks-libev.sss${count}.disabled=0 EOF fi + uci -q batch <<-EOF >/dev/null + set openmptcprouter.${name}.current='1' + commit openmptcprouter + EOF if [ "$count" -eq "0" ]; then config_load openmptcprouter @@ -449,8 +455,6 @@ _check_backup() { del openvpn.omr.remote add_list openvpn.omr.remote="$ip" commit openvpn - set openmptcprouter.${name}.current='1' - commit openmptcprouter EOF /etc/init.d/openmptcprouter-vps get_openvpn_key "$name" >/dev/null 2>/dev/null #/etc/init.d/openmptcprouter-vps restart >/dev/null 2>/dev/null