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

Check that rules are really up in omr-tracker-ss (#502)

This commit is contained in:
suyuan 2024-06-19 10:11:59 +08:00 committed by GitHub
commit 47ffa839cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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