From eed03938dc51a528a9a87bee8313b90266617df1 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Sat, 3 Jun 2023 12:59:35 +0200 Subject: [PATCH] Update install script --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 7f0286b..ad693a8 100755 --- a/install.sh +++ b/install.sh @@ -10,15 +10,16 @@ if [ -f $run_directory/.disabled ]; then fi echo "Copying Systemd units to system directory..." -$sudo cp $run_directory/systemd-templates/set-ip-routes.service /etc/systemd/system/ -$sudo sed -i -e "s/PH_DNS/$dns_server/g" /etc/systemd/system/set-ip-routes.service -$sudo sed -i -e "s:PH_NETWORK:$target_network:g" /etc/systemd/system/set-ip-routes.service -$sudo cp $run_directory/systemd-templates/set-ip-routes.path /etc/systemd/system/ +mkdir /etc/systemd/system +cp $run_directory/systemd-templates/set-ip-routes.service /etc/systemd/system/ +sed -i -e "s/PH_DNS/$dns_server/g" /etc/systemd/system/set-ip-routes.service +sed -i -e "s:PH_NETWORK:$target_network:g" /etc/systemd/system/set-ip-routes.service +cp $run_directory/systemd-templates/set-ip-routes.path /etc/systemd/system/ echo "Reloading Systemd..." -$sudo systemctl daemon-reload +systemctl daemon-reload echo "Enabling path unit (not starting it, either do it manually or reboot)..." -$sudo systemctl enable set-ip-routes.path +systemctl enable set-ip-routes.path echo "Finished install. Exiting..." exit 0