diff --git a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash index e4ea71373a..e794c61037 100755 --- a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash +++ b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash @@ -164,7 +164,7 @@ yml_check() sed -i '/^ *$/d' /tmp/backprovider.yaml 2>/dev/null sed -i '/proxy-provider:/r/tmp/backprovider.yaml' "$3" 2>/dev/null rm -rf /tmp/backprovider.yaml 2>/dev/null - elif [ "$provider_len" -ge "$group_len" ] && [ "$provider_len" -le "$rule_len" ]; then; then + elif [ "$provider_len" -ge "$group_len" ] && [ "$provider_len" -le "$rule_len" ]; then awk '/^proxy-provider:/,/^Rule:/{print}' "$3" | sed '/^Rule:/d' >/tmp/backprovider.yaml 2>/dev/null sed -i '/^Rule:/i\proxy-provider-tag' "$3" 2>/dev/null sed -i '/^proxy-provider:/,/proxy-provider-tag/d' "$3" 2>/dev/null @@ -1171,4 +1171,4 @@ restart() { stop start -} \ No newline at end of file +}