1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Check that rules are really up in omr-tracker-ss

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-06-18 17:08:31 +02:00
parent 6d8e55fe5f
commit 95797d1eba

View file

@ -126,10 +126,16 @@ while true; do
if [ "$type" = "libev" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.disabled)" != "1" ]; then
_log "Reload Shadowsocks rules"
/etc/init.d/shadowsocks-libev rules_up 2> /dev/null
if ! /etc/init.d/shadowsocks-libev rules_exist ; then
/etc/init.d/shadowsocks-libev restart 2>&1 >/dev/null
fi
_get_ip
elif [ "$type" = "rust" ] && [ "$(uci -q get shadowsocks-rust.ss_rules.disabled)" != "1" ]; then
_log "Reload Shadowsocks Rust rules"
/etc/init.d/shadowsocks-rust rules_up 2> /dev/null
if ! /etc/init.d/shadowsocks-rust rules_exist ; then
/etc/init.d/shadowsocks-rust restart 2>&1 >/dev/null
fi
_get_ip
fi
fi