- temp commit
This commit is contained in:
parent
66b1a6794e
commit
c79fb81c37
|
@ -9,6 +9,7 @@ import shutil
|
||||||
import platform
|
import platform
|
||||||
from configobj import ConfigObj
|
from configobj import ConfigObj
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
import string
|
||||||
|
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
print "Please run this as root."
|
print "Please run this as root."
|
||||||
|
@ -101,6 +102,19 @@ try:
|
||||||
# as we don't use it anymore.(CC-2552)
|
# as we don't use it anymore.(CC-2552)
|
||||||
os.remove(config["bin_dir"]+"/bin/liquidsoap_scripts/liquidsoap.cfg")
|
os.remove(config["bin_dir"]+"/bin/liquidsoap_scripts/liquidsoap.cfg")
|
||||||
|
|
||||||
|
# replace some variables in liquidsoap.cfg
|
||||||
|
input = open("/etc/airtime/liquidsoap.cfg")
|
||||||
|
content = input.read()
|
||||||
|
text = string.replace(content,"%%s1_stream%%", "true")
|
||||||
|
text = string.replace(text, "%%s2_stream%%", "false")
|
||||||
|
text = string.replace(text,"%%s3_stream%%", "false")
|
||||||
|
text = string.replace(text,"%%s1_bitrate%%", "128")
|
||||||
|
text = string.replace(text,"%%s1_mount_point%%", "airtime.mp3")
|
||||||
|
text = string.replace(text,"%%s1_description%%", "Airtime Radio!")
|
||||||
|
text = string.replace(text,"%%s1_genre%%", "genre")
|
||||||
|
out = open("/etc/airtime/liquidsoap.cfg", 'w')
|
||||||
|
out.write(text)
|
||||||
|
|
||||||
print "Setting permissions"
|
print "Setting permissions"
|
||||||
os.system("chmod -R 755 "+config["bin_dir"])
|
os.system("chmod -R 755 "+config["bin_dir"])
|
||||||
os.system("chown -R pypo:pypo "+config["bin_dir"])
|
os.system("chown -R pypo:pypo "+config["bin_dir"])
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
# Output settings #
|
# Output settings #
|
||||||
###########################################
|
###########################################
|
||||||
output_sound_device = false
|
output_sound_device = false
|
||||||
output_icecast_vorbis = true
|
output_icecast_s1 = %%s1_stream%%
|
||||||
output_icecast_mp3 = false
|
output_icecast_s2 = %%s2_stream%%
|
||||||
|
output_icecast_s3 = %%s3_stream%%
|
||||||
output_shoutcast = false
|
output_shoutcast = false
|
||||||
|
|
||||||
#output_bitrate = 128
|
output_s1_bitrate = %%s1_bitrate%%
|
||||||
|
output_s2_bitrate = %%s2_bitrate%%
|
||||||
|
output_s3_bitrate = %%s3_bitrate%%
|
||||||
#output_samplerate = 44100
|
#output_samplerate = 44100
|
||||||
#output_stereo = true
|
#output_stereo = true
|
||||||
|
|
||||||
|
@ -28,13 +31,18 @@ icecast_port = 8000
|
||||||
icecast_pass = "hackme"
|
icecast_pass = "hackme"
|
||||||
|
|
||||||
# Icecast mountpoint names
|
# Icecast mountpoint names
|
||||||
mount_point_mp3 = "airtime.mp3"
|
mount_point_s1 = "%%s1_mount_point%%"
|
||||||
mount_point_vorbis = "airtime.ogg"
|
mount_point_s2 = "%%s2_mount_point%%"
|
||||||
|
mount_point_s3 = "%%s3_mount_point%%"
|
||||||
|
|
||||||
# Webstream metadata settings
|
# Webstream metadata settings
|
||||||
icecast_url = "http://airtime.sourcefabric.org"
|
icecast_url = "http://airtime.sourcefabric.org"
|
||||||
icecast_description = "Airtime Radio!"
|
icecast_s1_description = "%%s1_description%%"
|
||||||
icecast_genre = "genre"
|
icecast_s2_description = "%%s2_description%%"
|
||||||
|
icecast_s3_description = "%%s3_description%%"
|
||||||
|
icecast_s1_genre = "%%s1_genre%%"
|
||||||
|
icecast_s2_genre = "%%s2_genre%%"
|
||||||
|
icecast_s3_genre = "%%s3_genre%%"
|
||||||
|
|
||||||
# Audio stream metadata for vorbis/ogg is disabled by default
|
# Audio stream metadata for vorbis/ogg is disabled by default
|
||||||
# due to a number of client media players that disconnect
|
# due to a number of client media players that disconnect
|
||||||
|
|
|
@ -56,7 +56,7 @@ if output_sound_device then
|
||||||
ignore(output.alsa(s))
|
ignore(output.alsa(s))
|
||||||
end
|
end
|
||||||
|
|
||||||
if output_icecast_mp3 then
|
if output_icecast_s1 then
|
||||||
|
|
||||||
#format = %mp3(bitrate=192, samplerate=44100, stereo=false)
|
#format = %mp3(bitrate=192, samplerate=44100, stereo=false)
|
||||||
ignore(output.icecast(%mp3,
|
ignore(output.icecast(%mp3,
|
||||||
|
|
Loading…
Reference in New Issue