From 52e3e73d48e6e9598e27e9ff88f19e479cc48042 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 2 Aug 2024 14:32:04 +0200 Subject: [PATCH] Set current server as current in OMR Tracker server --- omr-tracker/files/bin/omr-tracker-server | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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