Fix argument processing logic.

This commit is contained in:
redxef 2023-06-15 02:04:04 +02:00
parent c3b283d51f
commit 4a1d206ce5
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -109,12 +109,12 @@ up() {
if [[ -z "$translation_filepath" ]]; then
translation_filepath="$2"
fi
if [[ "$translation_filepath" =~ .*/.* ]]; then
# path, not a name, leave as is
:
else
translation_filepath="/etc/gre-on-wg/$filepath.conf"
fi
translation_filepath="/etc/gre-on-wg/$translation_filepath.conf"
fi
r="$(read_wg_conf "$filepath")"