CC-2661: Upgrade script for steam config feature

- done
This commit is contained in:
James 2011-08-29 17:44:28 -04:00
parent 83bba9532e
commit cab2a0f8f4
13 changed files with 668 additions and 6 deletions

View file

@ -6,9 +6,9 @@
# Output settings #
###########################################
output_sound_device = false
output_s1 = "icecast"
output_s2 = "disabled"
output_s3 = "disabled"
s1_output = "icecast"
s2_output = "disabled"
s3_output = "disabled"
s1_type = "ogg"
s2_type = "ogg"

View file

@ -128,14 +128,19 @@ class PypoFetch(Thread):
existing = {}
# create a temp file
fh = open('/etc/airtime/liquidsoap.cfg', 'r')
logger.info("Reading existing config...")
# read existing conf file and build dict
while 1:
line = fh.readline()
line = line.strip()
if not line:
break
line = line.strip()
if line.find('#') == 0:
continue
# if empty line
if not line:
continue
key, value = line.split('=')
key = key.strip()
value = value.strip()
@ -153,6 +158,7 @@ class PypoFetch(Thread):
#restart flag
restart = False
logger.info("Looking for changes...")
# look for changes
for s in setting:
if "output_sound_device" in s[u'keyname']: