is this legacy? Don't even remember

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 21:41:14 +00:00
parent 7321d054ed
commit 32e9f9c758
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ Call ufw -h for help.
Dependencies: curl, jq Dependencies: curl, jq
The config goes into `$XDG_CONFIG_DIR/ufw`. The config goes into `$XDG_CONFIG_HOME/ufw`.
ufwd ufwd
---- ----
+5 -5
View File
@@ -55,7 +55,7 @@ usage() {
cfg_service_url cfg_service_url
Environment variables: Environment variables:
UFW_CFG_FILE # Config file to read, defaults to \$XDG_CONFIG_DIR/ufw UFW_CFG_FILE # Config file to read, defaults to \$XDG_CONFIG_HOME/ufw
UFW_SECRET # Your API secret UFW_SECRET # Your API secret
UFW_TMP_DIR UFW_TMP_DIR
UFW_URL UFW_URL
@@ -332,12 +332,12 @@ main() {
XDG_RUNTIME_DIR="/run/user/$UID" XDG_RUNTIME_DIR="/run/user/$UID"
fi fi
if ! [[ "$XDG_CONFIG_DIR" ]]; then if ! [[ "$XDG_CONFIG_HOME" ]]; then
XDG_CONFIG_DIR="$HOME/.config" XDG_CONFIG_HOME="$HOME/.config"
fi fi
cfg_url_regex='^[A-Za-z]([A-Za-z0-9+.-]+)?://.+' cfg_url_regex='^[A-Za-z]([A-Za-z0-9+.-]+)?://.+'
cfg_file=${UFW_CFG_FILE:-"$XDG_CONFIG_DIR/ufw"} cfg_file=${UFW_CFG_FILE:-"$XDG_CONFIG_HOME/ufw"}
[[ $UFW_SECRET ]] && secret=$UFW_SECRET [[ $UFW_SECRET ]] && secret=$UFW_SECRET
[[ $UFW_TMP_DIR ]] && cfg_tmp_dir=$UFW_TMP_DIR [[ $UFW_TMP_DIR ]] && cfg_tmp_dir=$UFW_TMP_DIR
@@ -353,7 +353,7 @@ main() {
fi fi
# Defaults # Defaults
: ${cfg_file:="$XDG_CONFIG_DIR/ufw"} : ${cfg_file:="$XDG_CONFIG_HOME/ufw"}
: ${cfg_tmp_dir:="$XDG_RUNTIME_DIR/ufw"} : ${cfg_tmp_dir:="$XDG_RUNTIME_DIR/ufw"}
: ${cfg_service_url:='https://8fw.me'} : ${cfg_service_url:='https://8fw.me'}
: ${cfg_max_filesize:='200M'} : ${cfg_max_filesize:='200M'}