20 lines
516 B
Bash
Executable File
20 lines
516 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
run_directory=$(dirname "$0")
|
|
|
|
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
|