aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfbt <fbt@fleshless.org>2019-11-24 14:00:32 +0300
committerfbt <fbt@fleshless.org>2019-11-24 14:00:32 +0300
commit4e1d3a7bcde27d70bc318a505e1734a0bdcaf047 (patch)
tree8d0943bf64fb10b6ad1d21e2e99c21842e667229
parent03e0fda8964e4826be2c86bbfad88a02c8534b69 (diff)
downloadufw-tools-4e1d3a7bcde27d70bc318a505e1734a0bdcaf047.tar.gz
ufw-tools-4e1d3a7bcde27d70bc318a505e1734a0bdcaf047.zip
A better way
Signed-off-by: fbt <fbt@fleshless.org>
-rwxr-xr-xufw2
1 files changed, 1 insertions, 1 deletions
diff --git a/ufw b/ufw
index 00021cf..994645c 100755
--- a/ufw
+++ b/ufw
@@ -357,10 +357,10 @@ main() {
fi
cfg_url_regex='^[A-Za-z]([A-Za-z0-9+.-]+)?://.+'
+ cfg_file=${UFW_CFG_FILE:-"$XDG_CONFIG_DIR/ufw"}
[[ $1 ]] || { usage; return 1; }
- [[ $UFW_CFG_FILE ]] && cfg_file=$UFW_CFG_FILE
if [[ -f "$cfg_file" ]]; then
if ! source "$cfg_file"; then
printf 'Failed to source configuration file: %s\n' "$cfg_file"