cloud-cron/install.sh

20 lines
516 B
Bash
Raw Normal View History

2022-05-22 11:45:24 +02:00
#!/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