diff --git a/build/build.properties b/build/build.properties index 588b7c122..50915fb41 100644 --- a/build/build.properties +++ b/build/build.properties @@ -1,4 +1,6 @@ -project.home = /home/naomiaro/dev-campcaster/campcaster +#Note: project.home is automatically generated by the propel-install script. +#Any manual changes to this value will be overwritten. +project.home = /path/to/airtime project.build = ${project.home}/build #Database driver diff --git a/install/propel-install.php b/install/propel-install.php index 245ee3a3c..bb02baeaf 100644 --- a/install/propel-install.php +++ b/install/propel-install.php @@ -31,23 +31,17 @@ if(exec("whoami") != "root"){ $property = 'project.home'; $lines = file('../build/build.properties'); -foreach ($lines as $line) { +foreach ($lines as $key => &$line) { if ($property == substr($line, 0, strlen($property))){ - $indexOfEquals = strpos($line, '='); - if ($indexOfEquals !== false){ - $dir_value = trim(substr($line, $indexOfEquals+1)); - //check to make sure that the project.home path is equal to one level - //up of this install script location. - $dir_found = realpath(__dir__.'/../') == realpath($dir_value); - } - break; + $line = $property." = ".realpath(__dir__.'/../')."\n"; } } -if ($dir_found === false){ - echo ("../build/build.properties 'project.home' value of '$dir_value' is incorrect. Please correct and try install again.\n"); - exit(1); +$fp=fopen('../build/build.properties', 'w'); +foreach($lines as $key => $line){ + fwrite($fp, $line); } +fclose($fp); echo "******************************* Install Begin ********************************\n"; diff --git a/pypo/install/pypo-install.py b/pypo/install/pypo-install.py index a69ca01f6..34183e4e6 100644 --- a/pypo/install/pypo-install.py +++ b/pypo/install/pypo-install.py @@ -35,6 +35,9 @@ def create_user(username): print "Creating user "+username os.system("adduser --system --quiet --group --shell /bin/bash "+username) + #add pypo to audio group + os.system("adduser " + username + " audio") + #set pypo password p = os.popen('/usr/bin/passwd pypo', 'w') p.write('pypo\n') diff --git a/pypo/pypo-cli.py b/pypo/pypo-cli.py index db52f4819..dd23b6fcf 100755 --- a/pypo/pypo-cli.py +++ b/pypo/pypo-cli.py @@ -693,6 +693,8 @@ class Playout: # Get any extra information for liquidsoap (which will be sent back to us) liquidsoap_data = self.api_client.get_liquidsoap_data(pkey, schedule) logger.debug("Sending additional data to liquidsoap: "+liquidsoap_data) + + #Sending JSON string. Example: {"schedule_id":"13"} tn.write("vars.pypo_data "+liquidsoap_data+"\n") tn.write(self.export_source + '.flip') diff --git a/pypo/scripts/ls_script.liq b/pypo/scripts/ls_script.liq index b4de4d692..5d2414f35 100644 --- a/pypo/scripts/ls_script.liq +++ b/pypo/scripts/ls_script.liq @@ -94,13 +94,13 @@ source = smooth_add(normal=source,special=special) # Stream Output ##################################### # finally the output | mp3 -clock(id="clock_icecast", - output.icecast(%mp3, - host = icecast_host, port = icecast_port, - password = icecast_pass, mount = mount_scheduler, - fallible = true, - restart = true, - restart_delay = 5, - buffer(source))) +#clock(id="clock_icecast", +# output.icecast(%mp3, +# host = icecast_host, port = icecast_port, +# password = icecast_pass, mount = mount_scheduler, +# fallible = true, +# restart = true, +# restart_delay = 5, +# buffer(source))) -#output.dummy(live_in) +out(source)