From 1c30d1c4ccbd336d384fe2dfc0750a3a2efcbc09 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 22 Sep 2022 18:51:37 +0200 Subject: [PATCH] Set scripts to new run_directory norm --- install.sh | 2 +- main.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index e9d83bf..42262c4 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -run_directory=$(dirname "$0") +run_directory=$(dirname $(readlink -f "$0")) if [ -f $run_directory/.disabled ]; then echo "Installation is disabled. Exiting..." diff --git a/main.sh b/main.sh index 9842471..8831b43 100755 --- a/main.sh +++ b/main.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash -source "$(dirname "$0")/variables.conf" +run_directory=$(dirname $(readlink -f "$0")) +source "$run_directory/variables.conf" -KEY="$(dirname "$0")/dns.key" +KEY="$run_directory/dns.key" TTL=604800 FQDN=$(hostname)