Skip to content

Commit

Permalink
Add script check and show no-signal preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ApsOps committed Sep 1, 2014
1 parent a69cc2f commit db8210b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions check_signal.py
@@ -0,0 +1,20 @@
import requests
import shutil
import config

groups = config.config_load().groups()

for group in groups:
url = "http://" + group + ".encoder.timvideos.us:8081/loop.raw"
print "scanning " + group
try:
r = requests.get(url, stream=True)
except:
print group + " is down..."
continue
if r.headers['content-type'] == 'None':
print "NO SIGNAL in " + group
try:
shutil.copy('/home/ubuntu/no_signal.png','/srv/'+group+'/00000001.png')
except Exception, e:
raise shutil.Error('Unable to copy no_signal.png\n%s' % e)

0 comments on commit db8210b

Please sign in to comment.