2022-05-22 11:45:24 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-09-22 18:49:05 +02:00
|
|
|
run_directory=$(dirname $(readlink -f "$0"))
|
2022-05-22 11:45:24 +02:00
|
|
|
|
|
|
|
if [ -f $run_directory/.disabled ]; then
|
|
|
|
echo "Installation is disabled. Exiting..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Copying Systemd units to system directory..."
|
|
|
|
sudo cp $run_directory/cloud-cron.service $run_directory/cloud-cron.timer /etc/systemd/system/
|
|
|
|
|
|
|
|
echo "Reloading Systemd..."
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
echo "Enabling timer (not starting it, either do it manually or reboot)..."
|
|
|
|
sudo systemctl enable cloud-cron.timer
|
|
|
|
|
|
|
|
echo "Finished install. Exiting..."
|
|
|
|
exit 0
|