Skip to content

Commit

Permalink
Commit less often in OMR-Tracker Post Tracking up script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jul 25, 2024
1 parent c34cb17 commit bec9a3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions omr-tracker/files/usr/share/omr/post-tracking.d/003-up
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ] || [ "$OMR_TRACKER_INTERFACE" = "omr6in4" ]; then
if [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
uci -q set openmptcprouter.omr.vpn='up'
uci -q commit openmptcprouter
fi
if [ "$(uci -q get openmptcprouter.settings.shadowsocksudp)" = "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ -n "$(uci -q get shadowsocks-libev.sss0)" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi1" ]; then
_log "Tunnel up disable use of ShadowSocks for UDP"
Expand Down Expand Up @@ -808,8 +807,8 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
#else
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
#fi
[ -n "$(uci -q changes openmptcprouter)" ] && uci -q commit openmptcprouter
fi
[ -n "$(uci -q changes openmptcprouter)" ] && uci -q commit openmptcprouter
nbserver=0
piholeenabled=0
config_load openmptcprouter
Expand Down Expand Up @@ -849,7 +848,6 @@ if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR
fi
if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up'
uci -q commit openmptcprouter
dns_flush
fi

Expand Down Expand Up @@ -958,7 +956,7 @@ if [ "$multipath_config" = "master" ]; then
[ "$(pgrep -f openmptcprouter-vps)" = "" ] && {
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1 &
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
uci -q commit openmptcprouter.$OMR_TRACKER_INTERFACE
#uci -q commit openmptcprouter.$OMR_TRACKER_INTERFACE
}
fi
multipath_config="on"
Expand Down Expand Up @@ -1070,4 +1068,6 @@ if [ "$(sysctl -qen net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ] || [ "$(sysct
fi
}
fi
[ -n "$(uci -q changes openmptcprouter)" ] && uci -q commit openmptcprouter

#ubus call network reload

0 comments on commit bec9a3c

Please sign in to comment.