Created
May 19, 2018 10:41
-
-
Save JeremieRapin/bc35a2632c072a082d48f5503270df16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Add the following line in /etc/crontab | |
# * * * * * root /home/pi/watchdog.sh | |
# | |
status=$(sudo systemctl status raspotify | grep -E "(WARN|ERROR|101)") | |
if [ ! -z "$status" ]; then | |
sudo systemctl restart raspotify | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment