Skip to content

Commit

Permalink
Set current server as current in OMR Tracker server
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Aug 2, 2024
1 parent cffa812 commit 52e3e73
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions omr-tracker/files/bin/omr-tracker-server
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 52e3e73

Please sign in to comment.