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")"