From ace98569ed9213adf856b7cfe28f89d5b86a8b8e Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 9 Sep 2011 14:11:56 -0400 Subject: [PATCH 01/17] CC-2783: Investigate Pypo taking 100% CPU on production system -fixed --- python_apps/pypo/pypofetch.py | 2 +- python_apps/pypo/pypopush.py | 41 +---------------------------------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 6c531cabd..544312773 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -178,7 +178,7 @@ class PypoFetch(Thread): scheduled_data = dict() scheduled_data['liquidsoap_playlists'] = liquidsoap_playlists scheduled_data['schedule'] = playlists - scheduled_data['stream_metadata'] = schedule_data["stream_metadata"] + scheduled_data['stream_metadata'] = schedule_data["stream_metadata"] self.queue.put(scheduled_data) # cleanup diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index a4cc46282..cbce20e43 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -82,8 +82,6 @@ class PypoPush(Thread): currently_on_air = False if schedule: - playedItems = self.load_schedule_tracker() - timenow = time.time() tcoming = time.localtime(timenow + self.push_ahead) str_tcoming_s = "%04d-%02d-%02d-%02d-%02d-%02d" % (tcoming[0], tcoming[1], tcoming[2], tcoming[3], tcoming[4], tcoming[5]) @@ -96,12 +94,8 @@ class PypoPush(Thread): for pkey in schedule: plstart = schedule[pkey]['start'][0:19] - #plstart = pkey[0:19] - #playedFlag = (pkey in playedItems) and playedItems[pkey].get("played", 0) - playedFlag = False - - if plstart == str_tcoming_s or (plstart < str_tcoming_s and plstart > str_tcoming2_s and not playedFlag): + if plstart == str_tcoming_s or (plstart < str_tcoming_s and plstart > str_tcoming2_s): logger.debug('Preparing to push playlist scheduled at: %s', pkey) playlist = schedule[pkey] @@ -111,14 +105,6 @@ class PypoPush(Thread): # force liquidsoap to refresh. if (self.push_liquidsoap(pkey, schedule, playlists) == 1): logger.debug("Pushed to liquidsoap, updating 'played' status.") - # Marked the current playlist as 'played' in the schedule tracker - # so it is not called again in the next push loop. - # Write changes back to tracker file. - playedItems[pkey] = playlist - playedItems[pkey]['played'] = 1 - schedule_tracker = open(self.schedule_tracker_file, "w") - pickle.dump(playedItems, schedule_tracker) - schedule_tracker.close() # Call API to update schedule states logger.debug("Doing callback to server to update 'played' status.") @@ -129,8 +115,6 @@ class PypoPush(Thread): if show_start <= str_tnow_s and str_tnow_s < show_end: currently_on_air = True - else: - pass if not currently_on_air and self.liquidsoap_state_play: logger.debug('Notifying Liquidsoap to stop playback.') @@ -202,29 +186,6 @@ class PypoPush(Thread): status = 0 return status - def load_schedule_tracker(self): - logger = logging.getLogger('push') - playedItems = dict() - - # create the file if it doesnt exist - if (not os.path.exists(self.schedule_tracker_file)): - try: - logger.debug('creating file ' + self.schedule_tracker_file) - schedule_tracker = open(self.schedule_tracker_file, 'w') - pickle.dump(playedItems, schedule_tracker) - schedule_tracker.close() - except Exception, e: - logger.error('Error creating schedule tracker file: %s', e) - else: - try: - schedule_tracker = open(self.schedule_tracker_file, "r") - playedItems = pickle.load(schedule_tracker) - schedule_tracker.close() - except Exception, e: - logger.error('Unable to load schedule tracker file: %s', e) - - return playedItems - def run(self): loops = 0 heartbeat_period = math.floor(30/PUSH_INTERVAL) From ca292635798e929bf08f9d6452b40e0f761b4823 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 9 Sep 2011 14:30:44 -0400 Subject: [PATCH 02/17] CC-2794: Upgrade script for 1.9.4 -fixed --- .../upgrades/airtime-1.9.4/airtime-upgrade.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php index 888b0a7f9..41d35436e 100644 --- a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php @@ -3,13 +3,27 @@ class Airtime194Upgrade{ const CONF_FILE_LIQUIDSOAP = "/etc/airtime/liquidsoap.cfg"; + const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf"; const CONF_PYPO_GRP = "pypo"; public static function upgradeLiquidsoapCfgPerms(){ chmod(self::CONF_FILE_LIQUIDSOAP, 0640); chgrp(self::CONF_FILE_LIQUIDSOAP, self::CONF_PYPO_GRP); } + + public static function InstallAirtimePhpServerCode($phpDir) + { + $AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc'); + + echo "* Installing PHP code to ".$phpDir.PHP_EOL; + exec("mkdir -p ".$phpDir); + exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir); + } } + +$values = parse_ini_file(AirtimeIni194::CONF_FILE_AIRTIME, true); +$phpDir = $values['general']['airtime_dir']; +Airtime194Upgrade::InstallAirtimePhpServerCode($phpDir); Airtime194Upgrade::upgradeLiquidsoapCfgPerms(); From f1c77845eafc6969b674fa05c9ccca01ebca69af Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 9 Sep 2011 14:49:12 -0400 Subject: [PATCH 03/17] CC-2783: Investigate Pypo taking 100% CPU on production system -fixed --- python_apps/pypo/pypopush.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index cbce20e43..21d2a42b9 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -41,13 +41,7 @@ class PypoPush(Thread): self.playlists = dict() self.stream_metadata = dict() - """ - push_ahead2 MUST be < push_ahead. The difference in these two values - gives the number of seconds of the window of opportunity for the scheduler - to catch when a playlist is to be played. - """ self.push_ahead = 10 - self.push_ahead2 = self.push_ahead -5 #toggle between "stop" and "play". Keeps track of the state of #liquidsoap @@ -86,16 +80,13 @@ class PypoPush(Thread): tcoming = time.localtime(timenow + self.push_ahead) str_tcoming_s = "%04d-%02d-%02d-%02d-%02d-%02d" % (tcoming[0], tcoming[1], tcoming[2], tcoming[3], tcoming[4], tcoming[5]) - tcoming2 = time.localtime(timenow + self.push_ahead2) - str_tcoming2_s = "%04d-%02d-%02d-%02d-%02d-%02d" % (tcoming2[0], tcoming2[1], tcoming2[2], tcoming2[3], tcoming2[4], tcoming2[5]) - tnow = time.localtime(timenow) str_tnow_s = "%04d-%02d-%02d-%02d-%02d-%02d" % (tnow[0], tnow[1], tnow[2], tnow[3], tnow[4], tnow[5]) for pkey in schedule: plstart = schedule[pkey]['start'][0:19] - if plstart == str_tcoming_s or (plstart < str_tcoming_s and plstart > str_tcoming2_s): + if str_tnow_s <= plstart and plstart < str_tcoming_s: logger.debug('Preparing to push playlist scheduled at: %s', pkey) playlist = schedule[pkey] From de753bcb49a64a56199c2d3cf7810d5b8e6ed953 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 9 Sep 2011 14:49:25 -0400 Subject: [PATCH 04/17] -fix installer warning --- install_minimal/airtime-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index fe50d4a53..bc0e66ae1 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -62,7 +62,7 @@ python ${SCRIPTPATH}/../python_apps/create-pypo-user.py set +e php ${SCRIPTPATH}/include/airtime-install.php $@ -$result=$? +result=$? if [ "$result" -eq "2" ]; then #We've just finished an upgrade, so let's exit exit 0 From 5d8f87208be1d5ac6c5b75cad74782d8cb5de157 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 9 Sep 2011 16:12:21 -0400 Subject: [PATCH 05/17] CC-2659: airtime-import: displaying help text on all exception - it's displaying help text on all exception and unknown errors --- utils/airtime-import/airtime-import.py | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index 014428702..4b7889c81 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -84,10 +84,8 @@ def checkOtherOption(args): def errorIfMultipleOption(args, msg=''): if(checkOtherOption(args)): if(msg != ''): - printHelp() raise OptionValueError(msg) else: - printHelp() raise OptionValueError("This option cannot be combined with other options") def printHelp(): @@ -123,7 +121,6 @@ There are two ways to import audio files into Airtime: def CopyAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) == 0 ): - printHelp() raise OptionValueError("No argument found. This option requires at least one argument.") stor = helper_get_stor_dir() if(stor is None): @@ -134,7 +131,6 @@ def CopyAction(option, opt, value, parser): def MoveAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) == 0 ): - printHelp() raise OptionValueError("No argument found. This option requires at least one argument.") stor = helper_get_stor_dir() if(stor is None): @@ -145,10 +141,8 @@ def MoveAction(option, opt, value, parser): def WatchAddAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) > 1): - printHelp() raise OptionValueError("Too many arguments. This option requires exactly one argument.") elif(len(parser.rargs) == 0 ): - printHelp() raise OptionValueError("No argument found. This option requires exactly one argument.") path = parser.rargs[0] if (path[0] == "/" or path[0] == "~"): @@ -171,7 +165,6 @@ def WatchAddAction(option, opt, value, parser): def WatchListAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) > 0): - printHelp() raise OptionValueError("This option doesn't take any arguments.") res = api_client.list_all_watched_dirs() if(res is None): @@ -188,10 +181,8 @@ def WatchListAction(option, opt, value, parser): def WatchRemoveAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) > 1): - printHelp() raise OptionValueError("Too many arguments. This option requires exactly one argument.") elif(len(parser.rargs) == 0 ): - printHelp() raise OptionValueError("No argument found. This option requires exactly one argument.") path = parser.rargs[0] if (path[0] == "/" or path[0] == "~"): @@ -234,10 +225,8 @@ def StorageSetAction(option, opt, value, parser): sys.exit(1) if(len(parser.rargs) > 1): - printHelp() raise OptionValueError("Too many arguments. This option requires exactly one argument.") elif(len(parser.rargs) == 0 ): - printHelp() raise OptionValueError("No argument found. This option requires exactly one argument.") path = parser.rargs[0] @@ -261,10 +250,13 @@ def StorageSetAction(option, opt, value, parser): def StorageGetAction(option, opt, value, parser): errorIfMultipleOption(parser.rargs) if(len(parser.rargs) > 0): - printHelp() raise OptionValueError("This option does not take any arguments.") print helper_get_stor_dir() +class OptionValueError(RuntimeError): + def __init__(self, msg): + self.msg = msg + usage = """[-c|--copy FILE/DIR [FILE/DIR...]] [-m|--move FILE/DIR [FILE/DIR...]] [--watch-add DIR] [--watch-list] [--watch-remove DIR] [--storage-dir-set DIR] [--storage-dir-get]""" @@ -294,7 +286,16 @@ if(len(sys.argv) == 1 or '-' not in sys.argv[1]): printHelp() sys.exit() -(option, args) = parser.parse_args() +try: + (option, args) = parser.parse_args() +except Exception, e: + printHelp() + print "Error: "+e.msg + sys.exit() +except SystemExit: + printHelp() + sys.exit() + if option.help: printHelp() sys.exit() From ac44ae7191925cd48ee851403288a4f0e630cf1f Mon Sep 17 00:00:00 2001 From: James Date: Fri, 9 Sep 2011 17:08:23 -0400 Subject: [PATCH 06/17] CC-2659: airtime-import: displaying help text on all exception - when it cannot communicate to Airtime Server, it displays just error msg --- utils/airtime-import/airtime-import.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index 4b7889c81..d5b0d3246 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -124,7 +124,8 @@ def CopyAction(option, opt, value, parser): raise OptionValueError("No argument found. This option requires at least one argument.") stor = helper_get_stor_dir() if(stor is None): - exit("Unable to connect to the Airtime server.") + print "Unable to connect to the Airtime server." + return dest = stor+"organize/" copy_or_move_files_to(parser.rargs, dest, 'copy') From ab302b46ad9540d24627fbe1ce64ec60b56d2217 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 12 Sep 2011 13:08:02 -0400 Subject: [PATCH 07/17] CC-2805: Airtime-import is failing - fixed --- utils/airtime-import/airtime-import.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index d5b0d3246..9eacf7648 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -291,7 +291,10 @@ try: (option, args) = parser.parse_args() except Exception, e: printHelp() - print "Error: "+e.msg + if hasattr(e, 'msg'): + print "Error: "+e.msg + else: + print "Error: "+e sys.exit() except SystemExit: printHelp() From cf7f278e19e0a201735a2dd3fc9f5205d5c53ab0 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 12 Sep 2011 14:52:56 -0400 Subject: [PATCH 08/17] CC-2802: When upgrading 1.8.2->1.9.4, .htaccess is being written with "Toronto/America" --- .../airtime-1.9.4/airtime-upgrade.php | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php index 41d35436e..6751db292 100644 --- a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php @@ -19,11 +19,58 @@ class Airtime194Upgrade{ exec("mkdir -p ".$phpDir); exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir); } - + + public static function ModifyHtAccessTimezone($phpDir){ + $file = realpath($phpDir)."/public/.htaccess"; + + $fn = "/etc/timezone"; + $handle = @fopen($fn, "r"); + if ($handle){ + $timezone = trim(fgets($handle, 4096)); + fclose($handle); + } else { + echo "Could not open $fn"; + } + + $key = "php_value date.timezone"; + //the best way to do this is use cli utility "sed", but I don't have time to learn this + $handle = @fopen($file, "r"); + if ($handle) { + while (($buffer = fgets($handle, 4096)) !== false) { + if (strlen($key) > $buffer){ + if (substr($buffer, 0, strlen($key)) == $key){ + $output[] = "$key \"$timezone\"".PHP_EOL; + } else { + $output[] = $buffer; + } + } else { + $output[] = $buffer; + } + } + if (!feof($handle)) { + echo "Error: unexpected fgets() fail\n"; + } + fclose($handle); + } else { + echo "Could not open $file"; + } + + $handle = @fopen($file, 'w'); + if ($handle) { + foreach ($output as $line){ + fwrite($handle, $line); + } + fclose($handle); + } else { + echo "Could not open $file"; + } + } } -$values = parse_ini_file(AirtimeIni194::CONF_FILE_AIRTIME, true); +$values = parse_ini_file(Airtime194Upgrade::CONF_FILE_AIRTIME, true); $phpDir = $values['general']['airtime_dir']; Airtime194Upgrade::InstallAirtimePhpServerCode($phpDir); +Airtime194Upgrade::ModifyHtAccessTimezone($phpDir); Airtime194Upgrade::upgradeLiquidsoapCfgPerms(); + From 875c7587901acde87a7278a3bf6b5732a7c6cab1 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 12 Sep 2011 17:56:16 -0400 Subject: [PATCH 09/17] -rabbitmq test files --- airtime_mvc/library/php-amqplib/demo/amqp_consumer.php | 4 ++-- airtime_mvc/library/php-amqplib/demo/amqp_publisher.php | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/library/php-amqplib/demo/amqp_consumer.php b/airtime_mvc/library/php-amqplib/demo/amqp_consumer.php index c3d0e085d..188fbc844 100755 --- a/airtime_mvc/library/php-amqplib/demo/amqp_consumer.php +++ b/airtime_mvc/library/php-amqplib/demo/amqp_consumer.php @@ -14,7 +14,7 @@ $PORT = 5672; $USER = 'guest'; $PASS = 'guest'; $VHOST = '/'; -$EXCHANGE = 'router'; +$EXCHANGE = 'airtime-schedule'; $QUEUE = 'msgs'; $CONSUMER_TAG = 'consumer'; @@ -23,7 +23,7 @@ $ch = $conn->channel(); $ch->access_request($VHOST, false, false, true, true); $ch->queue_declare($QUEUE); -$ch->exchange_declare($EXCHANGE, 'direct', false, false, false); +$ch->exchange_declare($EXCHANGE, 'direct', false, true); $ch->queue_bind($QUEUE, $EXCHANGE); function process_message($msg) { diff --git a/airtime_mvc/library/php-amqplib/demo/amqp_publisher.php b/airtime_mvc/library/php-amqplib/demo/amqp_publisher.php index 318ee5914..681df9fe8 100755 --- a/airtime_mvc/library/php-amqplib/demo/amqp_publisher.php +++ b/airtime_mvc/library/php-amqplib/demo/amqp_publisher.php @@ -13,15 +13,16 @@ $PORT = 5672; $USER = 'guest'; $PASS = 'guest'; $VHOST = '/'; -$EXCHANGE = 'router'; +$EXCHANGE = 'airtime-schedule'; $QUEUE = 'msgs'; $conn = new AMQPConnection($HOST, $PORT, $USER, $PASS); $ch = $conn->channel(); $ch->access_request($VHOST, false, false, true, true); -$ch->exchange_declare($EXCHANGE, 'direct', false, false, false); +$ch->exchange_declare($EXCHANGE, 'direct', false, true); -$msg_body = implode(' ', array_slice($argv, 1)); +$msg_body = json_encode(array("event_type"=>"get_status", "id"=>time())); +//$msg_body = '{"schedule":{"status":{"range":{"start":"2011-09-12 20:45:22","end":"2011-09-13 20:45:22"},"version":"1.1"},"playlists":[],"check":1,"stream_metadata":{"format":"","station_name":""}},"event_type":"update_schedule"}'; $msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain')); $ch->basic_publish($msg, $EXCHANGE); @@ -29,4 +30,5 @@ $ch->basic_publish($msg, $EXCHANGE); echo "Sent message '".$msg_body."'\n"; $ch->close(); $conn->close(); + ?> From ac7e4566c0df20c469e9b5b26cdb93178a4faa0f Mon Sep 17 00:00:00 2001 From: James Date: Tue, 13 Sep 2011 10:35:25 -0400 Subject: [PATCH 10/17] CC-2805: Airtime-import is failing - catching IOexception. --- utils/airtime-import/airtime-import.py | 61 ++++++++++++++------------ 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index 9eacf7648..746f3f082 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -31,34 +31,37 @@ api_client = apc.api_client_factory(config) # copy or move files # flag should be 'copy' or 'move' def copy_or_move_files_to(paths, dest, flag): - for path in paths: - if (path[0] == "/" or path[0] == "~"): - path = os.path.realpath(path) - else: - path = currentDir+path - path = apc.encode_to(path, 'utf-8') - dest = apc.encode_to(dest, 'utf-8') - if(os.path.exists(path)): - if(os.path.isdir(path)): - path = format_dir_string(path) - #construct full path - sub_path = [] - for temp in os.listdir(path): - sub_path.append(path+temp) - copy_or_move_files_to(sub_path, dest, flag) - elif(os.path.isfile(path)): - #copy file to dest - ext = os.path.splitext(path)[1] - if( 'mp3' in ext or 'ogg' in ext ): - destfile = dest+os.path.basename(path) - if(flag == 'copy'): - print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} - shutil.copyfile(path, destfile) - elif(flag == 'move'): - print "Moving %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} - shutil.move(path, destfile) - else: - print "Cannot find file or path: %s" % path + try: + for path in paths: + if (path[0] == "/" or path[0] == "~"): + path = os.path.realpath(path) + else: + path = currentDir+path + path = apc.encode_to(path, 'utf-8') + dest = apc.encode_to(dest, 'utf-8') + if(os.path.exists(path)): + if(os.path.isdir(path)): + path = format_dir_string(path) + #construct full path + sub_path = [] + for temp in os.listdir(path): + sub_path.append(path+temp) + copy_or_move_files_to(sub_path, dest, flag) + elif(os.path.isfile(path)): + #copy file to dest + ext = os.path.splitext(path)[1] + if( 'mp3' in ext or 'ogg' in ext ): + destfile = dest+os.path.basename(path) + if(flag == 'copy'): + print "Copying %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} + shutil.copyfile(path, destfile) + elif(flag == 'move'): + print "Moving %(src)s to %(dest)s..." % {'src':path, 'dest':destfile} + shutil.move(path, destfile) + else: + print "Cannot find file or path: %s" % path + except Exception as e: + print "Error: ", e def format_dir_string(path): if(path[-1] != '/'): @@ -294,7 +297,7 @@ except Exception, e: if hasattr(e, 'msg'): print "Error: "+e.msg else: - print "Error: "+e + print "Error: ",e sys.exit() except SystemExit: printHelp() From 4d3c9ce01e938d676e8f1baadf982b4f895444ea Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 13 Sep 2011 15:00:04 -0400 Subject: [PATCH 11/17] CC-2812: install script is using "sudo" -fixed --- install_minimal/airtime-install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index bc0e66ae1..3bf671d64 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -27,18 +27,18 @@ if [ ! -d "$VIRTUAL_ENV_DIR" ]; then set -e if [ $EXTRAOPTION -eq "0" ]; then - sudo virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv + virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv else # copy distribute-0.6.10.tar.gz to /usr/share/python-virtualenv/ # this is due to the bug in virtualenv 1.4.9 if [ -d "$VIRTUAL_ENV_SHARE" ]; then cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/ fi - sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv + virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv fi echo -e "\n*** Installing Python Libraries ***" - sudo /usr/lib/airtime/airtime_virtualenv/bin/pip install ${SCRIPTPATH}/airtime_virtual_env.pybundle -E /usr/lib/airtime/airtime_virtualenv + /usr/lib/airtime/airtime_virtualenv/bin/pip install ${SCRIPTPATH}/airtime_virtual_env.pybundle -E /usr/lib/airtime/airtime_virtualenv echo -e "\n*** Patching Python Libraries ***" PACHES=${SCRIPTPATH}/patches/* @@ -47,7 +47,7 @@ if [ ! -d "$VIRTUAL_ENV_DIR" ]; then DIRNAME=$(basename $file) echo -e "\n ---Applying Patches for $DIRNAME---" else - sudo patch -N -p0 -i $file + patch -N -p0 -i $file fi done else From ff8d4568312657aecc756e59529e0d95bfd1f198 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 13 Sep 2011 15:04:58 -0400 Subject: [PATCH 12/17] CC-2812: install script is using "sudo" -fixed --- install_full/ubuntu/airtime-full-install | 35 ++++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index 9c6800ac1..6e61a68de 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -7,8 +7,7 @@ exec > >(tee install_log.txt) exec 2>&1 if [ "$(id -u)" != "0" ]; then - echo "You need admin previlege to run this script" - echo "Syntaxe: sudo $0" + echo "You need root privileges to run this script" exit 1 fi @@ -24,10 +23,10 @@ echo " 1. Install Packages" echo "----------------------------------------------------" # Updated package list -sudo apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ +apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ php-pear php5-gd postgresql odbc-postgresql python2.6 lame libsoundtouch-ocaml \ libvorbis-ocaml-dev libmp3lame-dev libtaglib-ocaml libao-ocaml libmad-ocaml \ -libesd0 icecast2 sudo libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ +libesd0 icecast2 libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ ecasound php5-curl mpg123 rabbitmq-server monit python-virtualenv if [ "$?" -ne "0" ]; then @@ -38,19 +37,19 @@ if [ "$?" -ne "0" ]; then fi # Install phing -sudo pear channel-discover pear.phing.info -sudo pear install phing/phing-2.4.2 +pear channel-discover pear.phing.info +pear install phing/phing-2.4.2 # Apache Config File echo "----------------------------------------------------" echo "2. Apache Config File" echo "----------------------------------------------------" if [ ! -f /etc/apache2/sites-available/airtime ]; then - sudo cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime - sudo rm -rf /etc/apache2/sites-enabled/000-default - sudo ln -s /etc/apache2/sites-available/airtime /etc/apache2/sites-enabled/airtime - sudo a2enmod rewrite php5 - sudo service apache2 restart + cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime + rm -rf /etc/apache2/sites-enabled/000-default + ln -s /etc/apache2/sites-available/airtime /etc/apache2/sites-enabled/airtime + a2enmod rewrite php5 + service apache2 restart else echo "Apache config for Airtime already exists..." fi @@ -60,8 +59,8 @@ echo "----------------------------------------------------" echo "3. Enable Icecast" echo "----------------------------------------------------" cd /etc/default/ -sudo sed -i 's/ENABLE=false/ENABLE=true/g' icecast2 -sudo service icecast2 start +sed -i 's/ENABLE=false/ENABLE=true/g' icecast2 +service icecast2 start echo "" # Enable Monit @@ -69,22 +68,22 @@ echo "----------------------------------------------------" echo "4. Enable Monit" echo "----------------------------------------------------" cd /etc/default/ -sudo sed -i 's/startup=0/startup=1/g' monit -sudo cp $SCRIPTPATH/../../python_apps/monit/airtime-monit.cfg /etc/monit/conf.d +sed -i 's/startup=0/startup=1/g' monit +cp $SCRIPTPATH/../../python_apps/monit/airtime-monit.cfg /etc/monit/conf.d grep -q "include /etc/monit/conf.d" /etc/monit/monitrc RETVAL=$? if [ $RETVAL -ne 0 ] ; then - sudo echo "include /etc/monit/conf.d/*" >> /etc/monit/monitrc + echo "include /etc/monit/conf.d/*" >> /etc/monit/monitrc fi -sudo service monit start +service monit start # Run Airtime Install echo "----------------------------------------------------" echo "5. Run Airtime Install" echo "----------------------------------------------------" cd $SCRIPTPATH/../../install_minimal -sudo ./airtime-install +./airtime-install From 3b2933f98de768bf7e592105b8f4acf8f1dd1470 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 13 Sep 2011 15:18:18 -0400 Subject: [PATCH 13/17] -1.9.4 release prep --- CREDITS | 4 ++++ Changelog | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index 7bcb234b6..745ae324b 100644 --- a/CREDITS +++ b/CREDITS @@ -1,6 +1,10 @@ ======= CREDITS ======= +Version 1.9.4 +------------- +Same as previous version. + Version 1.9.3 ------------- Same as previous version. diff --git a/Changelog b/Changelog index a0adf814f..b22e92dbe 100644 --- a/Changelog +++ b/Changelog @@ -1,10 +1,24 @@ +1.9.4 - Sept 13, 2011 + *Improvements + -"airtime-import" command-line utility now offers better help when invalid parameters have + been passed. + *Fixes + -Fixed "Show Contents" displaying full-length of tracks, even if cue-points had been set. + -Fixed start date of show not updating after dragging and dropping. + -Fixed audio preview still playing after deleting a file in the Playlist Builder. + -Fixed uploads via the web-interface while using Internet Explorer failing when tracks contained "+" or + whitespace characters. + -Fixed issue where deleting a file from the Playlist Builder wouldn't always refresh the list to + remove the file. + -Fixed issue where upgrading from any previous Airtime would set "Toronto/America" as the default timezone + 1.9.3 - August 26th, 2011 *Improvements -It is now possible to upgrade your system while a show is playing. Playout will be temporarily interrupted for about 5-10 seconds and then playout will resume. Previously playout would not resume until the next scheduled show. - *fixes + *Fixes -Fixed bug where playout system did not work with mono files. -Fixed bug where sometimes audio files could be played out of order. From 0678882e923c02624a482983fee6bbbe5485dbf5 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 14 Sep 2011 11:58:12 -0400 Subject: [PATCH 14/17] CC-2821: airtime-uninstall script does not remove airtime-clean-storage - the script would be deleted during upgrade - it would aslo be deleted on uninstall if it exists --- install_minimal/include/AirtimeInstall.php | 1 + install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php | 1 + install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php | 1 + install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php | 1 + install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php | 2 ++ 5 files changed, 6 insertions(+) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index 5bce8ff37..fd03eab10 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -353,6 +353,7 @@ class AirtimeInstall exec("rm -f /usr/bin/airtime-update-db-settings"); exec("rm -f /usr/bin/airtime-check-system"); exec("rm -f /usr/bin/airtime-user"); + exec("rm -f /usr/bin/airtime-clean-storage "); } public static function InstallPhpCode() diff --git a/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php index 86b973570..3f6c57e76 100644 --- a/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php @@ -67,6 +67,7 @@ class AirtimeInstall{ exec("rm -f /usr/bin/airtime-update-db-settings"); exec("rm -f /usr/bin/airtime-check-system"); exec("rm -f /usr/bin/airtime-user"); + exec("rm -f /usr/bin/airtime-clean-storage "); } public static function DbTableExists($p_name) diff --git a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php index 1e38b54b9..17072ddd1 100644 --- a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php @@ -181,4 +181,5 @@ $values = parse_ini_file(AirtimeIni192::CONF_FILE_AIRTIME, true); $phpDir = $values['general']['airtime_dir']; Airtime192Upgrade::InstallAirtimePhpServerCode($phpDir); + AirtimeInstall::CreateSymlinksToUtils(); ?> \ No newline at end of file diff --git a/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php index 210a4b63f..7f167522b 100644 --- a/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php @@ -172,4 +172,5 @@ $values = parse_ini_file(AirtimeIni193::CONF_FILE_AIRTIME, true); $phpDir = $values['general']['airtime_dir']; Airtime193Upgrade::InstallAirtimePhpServerCode($phpDir); + AirtimeInstall::CreateSymlinksToUtils(); ?> \ No newline at end of file diff --git a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php index 6751db292..dda7ac72b 100644 --- a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php @@ -74,3 +74,5 @@ Airtime194Upgrade::InstallAirtimePhpServerCode($phpDir); Airtime194Upgrade::ModifyHtAccessTimezone($phpDir); Airtime194Upgrade::upgradeLiquidsoapCfgPerms(); +AirtimeInstall::CreateSymlinksToUtils(); + From 75b2440bcfd6cb971fa4a9feb5ccb8df2d535ba6 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 14 Sep 2011 12:05:31 -0400 Subject: [PATCH 15/17] CC-2822: Backup cofig file name - fixed --- install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php | 2 +- install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php index 17072ddd1..7bc0d573a 100644 --- a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php @@ -121,7 +121,7 @@ AirtimeIni192::CONF_FILE_LIQUIDSOAP); // Backup the config files - $suffix = date("Ymdhis")."-1.9.0"; + $suffix = date("Ymdhis")."-1.9.2"; foreach ($configFiles as $conf) { if (file_exists($conf)) { echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; diff --git a/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php index 7f167522b..d68d06df5 100644 --- a/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php @@ -121,7 +121,7 @@ AirtimeIni193::CONF_FILE_LIQUIDSOAP); // Backup the config files - $suffix = date("Ymdhis")."-1.9.0"; + $suffix = date("Ymdhis")."-1.9.3"; foreach ($configFiles as $conf) { if (file_exists($conf)) { echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; From 2fea2d4745fa08296080c1a5f6085833ae043e65 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 14 Sep 2011 12:36:05 -0400 Subject: [PATCH 16/17] CC-2823: 1.9.4 upgrade script was not merging config files - fixed --- .../airtime-1.9.2/airtime-upgrade.php | 1 + .../airtime-1.9.3/airtime-upgrade.php | 1 + .../airtime-1.9.4/airtime-monit.cfg.194 | 23 +++ .../airtime-1.9.4/airtime-upgrade.php | 157 +++++++++++++++++- .../upgrades/airtime-1.9.4/airtime.conf.194 | 23 +++ .../upgrades/airtime-1.9.4/api_client.cfg.194 | 110 ++++++++++++ .../upgrades/airtime-1.9.4/liquidsoap.cfg.194 | 55 ++++++ .../airtime-1.9.4/media-monitor.cfg.194 | 21 +++ .../upgrades/airtime-1.9.4/pypo.cfg.194 | 72 ++++++++ .../upgrades/airtime-1.9.4/recorder.cfg.194 | 26 +++ 10 files changed, 488 insertions(+), 1 deletion(-) create mode 100644 install_minimal/upgrades/airtime-1.9.4/airtime-monit.cfg.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/airtime.conf.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/api_client.cfg.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/liquidsoap.cfg.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/media-monitor.cfg.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/pypo.cfg.194 create mode 100644 install_minimal/upgrades/airtime-1.9.4/recorder.cfg.194 diff --git a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php index 7bc0d573a..3aee0d168 100644 --- a/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.2/airtime-upgrade.php @@ -1,4 +1,5 @@ .log" +#log_level = 3 + +########################################### +# Icecast Stream settings # +########################################### +icecast_host = "127.0.0.1" +icecast_port = 8000 +icecast_pass = "hackme" + +# Icecast mountpoint names +mount_point_mp3 = "airtime.mp3" +mount_point_vorbis = "airtime.ogg" + +# Webstream metadata settings +icecast_url = "http://airtime.sourcefabric.org" +icecast_description = "Airtime Radio!" +icecast_genre = "genre" + +# Audio stream metadata for vorbis/ogg is disabled by default +# due to a number of client media players that disconnect +# when the metadata changes to a new track. Some versions of +# mplayer and VLC have this problem. Enable this option at your +# own risk! +output_icecast_vorbis_metadata = false + +########################################### +# Shoutcast Stream settings # +########################################### +shoutcast_host = "127.0.0.1" +shoutcast_port = 9000 +shoutcast_pass = "testing" + +# Webstream metadata settings +shoutcast_url = "http://airtime.sourcefabric.org" +shoutcast_genre = "genre" diff --git a/install_minimal/upgrades/airtime-1.9.4/media-monitor.cfg.194 b/install_minimal/upgrades/airtime-1.9.4/media-monitor.cfg.194 new file mode 100644 index 000000000..066c42b31 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.4/media-monitor.cfg.194 @@ -0,0 +1,21 @@ +api_client = "airtime" + +# where the binary files live +bin_dir = '/usr/lib/airtime/media-monitor' + +# where the logging files live +log_dir = '/var/log/airtime/media-monitor' + + +############################################ +# RabbitMQ settings # +############################################ +rabbitmq_host = 'localhost' +rabbitmq_user = 'guest' +rabbitmq_password = 'guest' + +############################################ +# Media-Monitor preferences # +############################################ +check_filesystem_events = 5 #how long to queue up events performed on the files themselves. +check_airtime_events = 30 #how long to queue metadata input from airtime. diff --git a/install_minimal/upgrades/airtime-1.9.4/pypo.cfg.194 b/install_minimal/upgrades/airtime-1.9.4/pypo.cfg.194 new file mode 100644 index 000000000..352d234d0 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.4/pypo.cfg.194 @@ -0,0 +1,72 @@ +############################################ +# pypo - configuration # +############################################ + +# Set the type of client you are using. +# Currently supported types: +# 1) "obp" = Open Broadcast Platform +# 2) "airtime" +# +api_client = "airtime" + +############################################ +# Cache Directories # +# *include* trailing slash !! # +############################################ +cache_dir = '/var/tmp/airtime/pypo/cache/' +file_dir = '/var/tmp/airtime/pypo/files/' +tmp_dir = '/var/tmp/airtime/pypo/tmp/' + +############################################ +# Setup Directories # +# Do *not* include trailing slash !! # +############################################ +cache_base_dir = '/var/tmp/airtime/pypo' +bin_dir = '/usr/lib/airtime/pypo' +log_base_dir = '/var/log/airtime' +pypo_log_dir = '/var/log/airtime/pypo' +liquidsoap_log_dir = '/var/log/airtime/pypo-liquidsoap' + +############################################ +# Liquidsoap settings # +############################################ +ls_host = '127.0.0.1' +ls_port = '1234' + +############################################ +# RabbitMQ settings # +############################################ +rabbitmq_host = 'localhost' +rabbitmq_user = 'guest' +rabbitmq_password = 'guest' + +############################################ +# pypo preferences # +############################################ +prepare_ahead = 24 #in hours +cache_for = 24 #how long to hold the cache, in hours + +# Poll interval in seconds. +# +# This will rarely need to be changed because any schedule changes are +# automatically sent to pypo immediately. +# +# This is how often the poll script downloads new schedules and files from the +# server in the event that no changes are made to the schedule. +# +poll_interval = 3600 # in seconds. + + +# Push interval in seconds. +# +# This is how often the push script checks whether it has something new to +# push to liquidsoap. +# +# It's hard to imagine a situation where this should be more than 1 second. +# +push_interval = 1 # in seconds + +# 'pre' or 'otf'. 'pre' cues while playlist preparation +# while 'otf' (on the fly) cues while loading into ls +# (needs the post_processor patch) +cue_style = 'pre' diff --git a/install_minimal/upgrades/airtime-1.9.4/recorder.cfg.194 b/install_minimal/upgrades/airtime-1.9.4/recorder.cfg.194 new file mode 100644 index 000000000..762c01da3 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.4/recorder.cfg.194 @@ -0,0 +1,26 @@ +api_client = "airtime" + +# where the binary files live +bin_dir = '/usr/lib/airtime/show-recorder' + +# base path to store recordered shows at +base_recorded_files = '/var/tmp/airtime/show-recorder/' + +# where the logging files live +log_dir = '/var/log/airtime/show-recorder' + +############################################ +# RabbitMQ settings # +############################################ +rabbitmq_host = 'localhost' +rabbitmq_user = 'guest' +rabbitmq_password = 'guest' + +############################################ +# Recorded Audio settings # +############################################ +record_bitrate = 256 +record_samplerate = 44100 +record_channels = 2 +record_sample_size = 16 + From db1dcb643ced2d3f3b03cdc28dac4d633e255c76 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 14 Sep 2011 12:48:45 -0400 Subject: [PATCH 17/17] - uncommnet airtime-media-monitor part for monit --- .../upgrades/airtime-1.9.0/airtime-monit.cfg.190 | 8 ++++---- .../upgrades/airtime-1.9.2/airtime-monit.cfg.192 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.9.0/airtime-monit.cfg.190 b/install_minimal/upgrades/airtime-1.9.0/airtime-monit.cfg.190 index 22f05e2ca..647fffd10 100644 --- a/install_minimal/upgrades/airtime-1.9.0/airtime-monit.cfg.190 +++ b/install_minimal/upgrades/airtime-1.9.0/airtime-monit.cfg.190 @@ -13,10 +13,10 @@ with pidfile "/var/run/airtime-liquidsoap.pid" start program = "/etc/init.d/airtime-playout start" with timeout 10 seconds stop program = "/etc/init.d/airtime-playout stop" -# check process airtime-media-monitor -# with pidfile "/var/run/airtime-media-monitor.pid" -# start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds -# stop program = "/etc/init.d/airtime-media-monitor stop" + check process airtime-media-monitor + with pidfile "/var/run/airtime-media-monitor.pid" + start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds + stop program = "/etc/init.d/airtime-media-monitor stop" check process airtime-show-recorder with pidfile "/var/run/airtime-show-recorder.pid" start program = "/etc/init.d/airtime-show-recorder start" with timeout 10 seconds diff --git a/install_minimal/upgrades/airtime-1.9.2/airtime-monit.cfg.192 b/install_minimal/upgrades/airtime-1.9.2/airtime-monit.cfg.192 index 22f05e2ca..647fffd10 100644 --- a/install_minimal/upgrades/airtime-1.9.2/airtime-monit.cfg.192 +++ b/install_minimal/upgrades/airtime-1.9.2/airtime-monit.cfg.192 @@ -13,10 +13,10 @@ with pidfile "/var/run/airtime-liquidsoap.pid" start program = "/etc/init.d/airtime-playout start" with timeout 10 seconds stop program = "/etc/init.d/airtime-playout stop" -# check process airtime-media-monitor -# with pidfile "/var/run/airtime-media-monitor.pid" -# start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds -# stop program = "/etc/init.d/airtime-media-monitor stop" + check process airtime-media-monitor + with pidfile "/var/run/airtime-media-monitor.pid" + start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds + stop program = "/etc/init.d/airtime-media-monitor stop" check process airtime-show-recorder with pidfile "/var/run/airtime-show-recorder.pid" start program = "/etc/init.d/airtime-show-recorder start" with timeout 10 seconds