diff --git a/ufw b/ufw index 65b6e93..0a77ad2 100755 --- a/ufw +++ b/ufw @@ -278,6 +278,8 @@ get_token() { if get_api_status <<< "$api_response"; then secret=$(jq -r '.data.token' <<< "$api_response") + [[ $secret ]] || return 1 + printf 'export secret="%s"' "$secret" >> "$cfg_file" chmod 600 "$cfg_file" printf 'Done\n'