mirror of
https://github.com/FreifunkFranken/fff-monitoring.git
synced 2024-06-16 20:34:02 +02:00
16 lines
251 B
Bash
16 lines
251 B
Bash
|
#!/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
|
||
|
|