Commit e194f37a authored by birk's avatar birk
Browse files

added player check via cronjob

parent fa742773
......@@ -17,6 +17,12 @@ sudo apt-get install unattended-upgrades
setxkbmap ch
Enable automtic security update.
sudo dpkg-reconfigure unattended-upgrades
Install necessary software.
......@@ -69,4 +75,17 @@ This ensures that the player software starts automatically after startup and pos
Create directory `~/.config/systemd/user` and copy `service/player.service` there.
Enable the service: `systemctl --user enable player.service`
Reload the daemon: `sudo systemctl daemon-reload`
And restart the service: `sudo systemctl restart player.service`
\ No newline at end of file
And restart the service: `sudo systemctl restart player.service`
## Defining cronjobs to supervise the player and to delete the log file weekly
Via `crontab -e` add:
* * * * * /home/itz/madek-broadcaster/service/
0 0 * * 1 rm /home/itz/log
age=$(stat -c %Y ~/player_log/last_media_entry.txt)
now=$(date +"%s")
age=$((now - age))
if [ "$age" -gt 300 ]; then
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment