Skip to content

Instantly share code, notes, and snippets.

@mekya
Created February 23, 2018 07:49
Show Gist options
  • Save mekya/1115f316bdc66ae077d247d9542c1b15 to your computer and use it in GitHub Desktop.
Save mekya/1115f316bdc66ae077d247d9542c1b15 to your computer and use it in GitHub Desktop.
Check m3u8 files updated regularly
if [ $diff -gt $timeout ]
then
echo "Restarting channel $channelNo" >> /var/log/channel_control
sudo service channel_$channelNo stop
sleep 2
sudo service channel_$channelNo start
else
echo "Channel $channelNo running properly, last update time $diff seconds ago" >> /var/log/channel_control
fi
}
for number in {1..15}
do
check_channel $number
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment