diff --git a/scripts/crontiles.sh b/scripts/crontiles.sh new file mode 100755 index 0000000..1c3addc --- /dev/null +++ b/scripts/crontiles.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +command="systemctl restart uwsgi-tiles" + +if crontab -l | grep -q "$command" ; then + echo "Cron already set." + exit 1 +fi + +# Runs at X:14 +(crontab -l 2>/dev/null; echo "14 * * * * $command") | crontab - + +echo "Cron set successfully." +exit 0 +