From 4a1d206ce50bd2d08b8e3dc9b4cf999b56ae7560 Mon Sep 17 00:00:00 2001 From: redxef Date: Thu, 15 Jun 2023 02:04:04 +0200 Subject: [PATCH] Fix argument processing logic. --- gre-on-wg.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gre-on-wg.sh b/gre-on-wg.sh index 5ddc1c3..c48f843 100755 --- a/gre-on-wg.sh +++ b/gre-on-wg.sh @@ -109,12 +109,12 @@ up() { if [[ -z "$translation_filepath" ]]; then translation_filepath="$2" - if [[ "$translation_filepath" =~ .*/.* ]]; then - # path, not a name, leave as is - : - else - translation_filepath="/etc/gre-on-wg/$filepath.conf" - fi + fi + if [[ "$translation_filepath" =~ .*/.* ]]; then + # path, not a name, leave as is + : + else + translation_filepath="/etc/gre-on-wg/$translation_filepath.conf" fi r="$(read_wg_conf "$filepath")"