From 659e17f888583b22364e8de6d9520ec0b88fe8ef Mon Sep 17 00:00:00 2001 From: Zxilly Date: Tue, 24 Oct 2023 19:52:35 +0800 Subject: [PATCH] feat: add additional tip for conf --- openwrt/files/ua2f.init | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openwrt/files/ua2f.init b/openwrt/files/ua2f.init index df9579ed..70c78099 100755 --- a/openwrt/files/ua2f.init +++ b/openwrt/files/ua2f.init @@ -28,7 +28,11 @@ setup_firewall() { local handle_fw config_get_bool handle_fw "firewall" "handle_fw" "0" - [ "$handle_fw" -eq "1" ] || return 1 + + if [ "$handle_fw" -ne "1" ]; then + echo "Auto setup firewall disabled. You should set up it manually." + return 1 + fi local handle_tls handle_intranet handle_mmtls config_get_bool handle_tls "firewall" "handle_tls" "0" @@ -138,7 +142,11 @@ start_service() { local enabled config_get_bool enabled "enabled" "enabled" "0" - [ "$enabled" -eq "1" ] || return 1 + + if [ "$enabled" -ne "1" ]; then + echo "UA2F disabled. You should enable it manually." + return 1 + fi procd_open_instance "$NAME" procd_set_param command "$PROG"