2022-02-11 20:24:15 +01:00
|
|
|
#!/bin/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 sed -i -e "s/PH_USER/$(whoami)/g" /etc/systemd/system/dns-update.service
|
2022-02-11 20:45:54 +01:00
|
|
|
sudo sed -i -e "s:PH_DIRECTORY:$(pwd):g" /etc/systemd/system/dns-update.service
|
2022-02-11 20:24:15 +01:00
|
|
|
|
|
|
|
echo "Reloading Systemd..."
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
echo "Enabling timer (not starting it, either do it manually or reboot)"
|
|
|
|
sudo systemctl enable dns-update.timer
|
|
|
|
|
|
|
|
echo "Finished install. Exiting..."
|
|
|
|
exit 0
|