Update mixomo_openwrt_install.sh

This commit is contained in:
StressOzz authored and GitHub committed 2026-09-19 17:58:55 +05:00
1 parent c49418a684
commit d264a52096
1 file changed
+15
+15
View File
@@ -1280,6 +1280,12 @@ fi
uci set hev-socks5-tunnel.@instance[0].enabled='1'
uci set hev-socks5-tunnel.@instance[0].conffile='/etc/hev-socks5-tunnel/main.yml'
uci commit hev-socks5-tunnel
if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel
then
sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\1'1'/" /etc/config/hev-socks5-tunnel
fi
/etc/init.d/hev-socks5-tunnel restart
sleep 2
@@ -1476,6 +1482,15 @@ cp -r "$TMP2"/* "$DIR1"/ 2>/dev/null || {
rm -rf "$TMP1" "$TMP2"
if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel; then
sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\11'/g" /etc/config/hev-socks5-tunnel
fi
if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel
then
sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\1'1'/" /etc/config/hev-socks5-tunnel
fi
/etc/init.d/mihomo restart >/dev/null 2>&1
/etc/init.d/hev-socks5-tunnel restart >/dev/null 2>&1