Created
December 17, 2015 14:33
-
-
Save kvaps/45675d0d608815ba5619 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
icecast=play.artradio.su:8000 #радио-сервер IceCast | |
mountpoint="/mp3_192" #имя точки монтирования | |
#получаем статистику с сервера | |
req=$(curl http://$icecast/status2.xsl -s) | |
#ищем точку монтирования в статистике | |
if [[ "$req" != *"$mountpoint"* ]]; | |
then | |
echo $(date +"%y-%m-%d %T") "Watchdog: Stream not fond. Rebooting server..." | |
#перезапускаем вещалку | |
systemctl restart liquidsoap | |
else | |
echo $(date +"%y-%m-%d %T") "Watchdog: All is OK" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment