diff --git a/Scripts/deploy_new_server.sh b/Scripts/deploy_new_server.sh index 53b1cf2..2f14f31 100644 --- a/Scripts/deploy_new_server.sh +++ b/Scripts/deploy_new_server.sh @@ -6,7 +6,7 @@ if [ "$EUID" -ne 0 ]; then fi echo "+--------------------------------------------+" -my_wgl_folder=$(find /home -ignore_readdir_race -type d -name WireGuard-Ligase) +my_wgl_folder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. >/dev/null 2>&1 && pwd )" my_working_dir=$(pwd) check_pub_ip=$(curl -s https://checkip.amazonaws.com) diff --git a/Scripts/quick_setup.sh b/Scripts/quick_setup.sh index a5a27ae..4f40e90 100644 --- a/Scripts/quick_setup.sh +++ b/Scripts/quick_setup.sh @@ -5,7 +5,7 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi -my_wgl_folder=$(find /home -type d -name WireGuard-Ligase) +my_wgl_folder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. >/dev/null 2>&1 && pwd )" my_working_dir=$(pwd) source "$my_wgl_folder"/doc/functions.sh my_separator="--------------------------------------" diff --git a/Scripts/setup_iptables.sh b/Scripts/setup_iptables.sh index c1858d5..c5ebc14 100644 --- a/Scripts/setup_iptables.sh +++ b/Scripts/setup_iptables.sh @@ -5,7 +5,7 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi -my_wgl_folder=$(find /home -ignore_readdir_race -type d -name WireGuard-Ligase) +my_wgl_folder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. >/dev/null 2>&1 && pwd )" source "$my_wgl_folder"/doc/functions.sh # Setting the colours function colours diff --git a/configure-wireguard.sh b/configure-wireguard.sh index e90bb38..ac8bff8 100644 --- a/configure-wireguard.sh +++ b/configure-wireguard.sh @@ -22,7 +22,7 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi -my_wgl_folder=$(find /home -ignore_readdir_race -type d -name WireGuard-Ligase) +my_wgl_folder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" source "$my_wgl_folder"/doc/functions.sh # Setting the colours function