From bf2122e08f94b387de6e775afc223bfa14696390 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 17 Mar 2022 14:21:10 +0100 Subject: [PATCH] install.sh: fix for working when called from outside repo --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ee1ce88..58145f4 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash echo "Copying Systemd units to system directory..." -sudo cp systemd-templates/dns-update.service /etc/systemd/system/ -sudo cp systemd-templates/dns-update.timer /etc/systemd/system/ +sudo cp $(dirname "$0")/systemd-templates/dns-update.service /etc/systemd/system/ +sudo cp $(dirname "$0")/systemd-templates/dns-update.timer /etc/systemd/system/ sudo sed -i -e "s/PH_USER/$(whoami)/g" /etc/systemd/system/dns-update.service sudo sed -i -e "s:PH_DIRECTORY:$(pwd):g" /etc/systemd/system/dns-update.service