mirror of
https://github.com/FreifunkFranken/fff-monitoring.git
synced 2024-06-14 11:23:59 +02:00
Adrian Schmutzler
339eaee9a5
This prevents information sent via e-mail. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
17 lines
306 B
Bash
Executable File
17 lines
306 B
Bash
Executable File
#!/bin/sh
|
|
|
|
command="systemctl restart uwsgi-tiles"
|
|
append="2>&1 | /usr/bin/logger -t 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 $append") | crontab -
|
|
|
|
echo "Cron set successfully."
|
|
exit 0
|
|
|