Skip to content

Commit

Permalink
feat: add additional tip for conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Oct 24, 2023
1 parent 885f828 commit 659e17f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions openwrt/files/ua2f.init
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 659e17f

Please sign in to comment.