scripts: Add crontiles.sh

Provide regular restart of uwsgi-tiles as a workaround for
missing dots.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2017-12-08 13:35:03 +01:00
parent 4fa16a738a
commit b016489cfb
1 changed files with 15 additions and 0 deletions

15
scripts/crontiles.sh Executable file
View File

@ -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