From ad5d669309d69561f17c7a9a753e89e472ea1c75 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 25 Aug 2011 17:22:19 -0400 Subject: [PATCH] CC-2735: Upgrade script for 1.9.3 - general upgrade script - uncommented media monitor section in Monit config file --- install_minimal/include/airtime-upgrade.php | 3 + .../airtime-1.9.3/airtime-monit.cfg.193 | 23 +++ .../airtime-1.9.3/airtime-upgrade.php | 175 ++++++++++++++++++ .../upgrades/airtime-1.9.3/airtime.conf.193 | 23 +++ .../upgrades/airtime-1.9.3/api_client.cfg.193 | 110 +++++++++++ .../upgrades/airtime-1.9.3/liquidsoap.cfg.193 | 55 ++++++ .../airtime-1.9.3/media-monitor.cfg.193 | 21 +++ .../upgrades/airtime-1.9.3/pypo.cfg.193 | 72 +++++++ .../upgrades/airtime-1.9.3/recorder.cfg.193 | 26 +++ 9 files changed, 508 insertions(+) create mode 100644 install_minimal/upgrades/airtime-1.9.3/airtime-monit.cfg.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php create mode 100644 install_minimal/upgrades/airtime-1.9.3/airtime.conf.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/api_client.cfg.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/liquidsoap.cfg.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/media-monitor.cfg.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/pypo.cfg.193 create mode 100644 install_minimal/upgrades/airtime-1.9.3/recorder.cfg.193 diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 02c6adc35..90ee868f6 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -69,6 +69,9 @@ if (strcmp($version, "1.9.0") < 0){ if (strcmp($version, "1.9.2") < 0){ system("php ".__DIR__."/../upgrades/airtime-1.9.2/airtime-upgrade.php"); } +if (strcmp($version, "1.9.3") < 0){ + system("php ".__DIR__."/../upgrades/airtime-1.9.3/airtime-upgrade.php"); +} //set the new version in the database. diff --git a/install_minimal/upgrades/airtime-1.9.3/airtime-monit.cfg.193 b/install_minimal/upgrades/airtime-1.9.3/airtime-monit.cfg.193 new file mode 100644 index 000000000..647fffd10 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.3/airtime-monit.cfg.193 @@ -0,0 +1,23 @@ + set daemon 10 # Poll at 10 second intervals + set logfile syslog facility log_daemon + + set httpd port 2812 and use address 127.0.0.1 + allow localhost + allow admin:monit + + check process airtime-playout + with pidfile "/var/run/airtime-playout.pid" + start program = "/etc/init.d/airtime-playout start" with timeout 10 seconds + stop program = "/etc/init.d/airtime-playout stop" + check process airtime-liquidsoap + 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-show-recorder + with pidfile "/var/run/airtime-show-recorder.pid" + start program = "/etc/init.d/airtime-show-recorder start" with timeout 10 seconds + stop program = "/etc/init.d/airtime-show-recorder stop" diff --git a/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php new file mode 100644 index 000000000..3bc8cb21b --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.3/airtime-upgrade.php @@ -0,0 +1,175 @@ + \ No newline at end of file diff --git a/install_minimal/upgrades/airtime-1.9.3/airtime.conf.193 b/install_minimal/upgrades/airtime-1.9.3/airtime.conf.193 new file mode 100644 index 000000000..b9729ac97 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.3/airtime.conf.193 @@ -0,0 +1,23 @@ +[database] +host = localhost +dbname = airtime +dbuser = airtime +dbpass = airtime + +[rabbitmq] +host = 127.0.0.1 +port = 5672 +user = guest +password = guest +vhost = / + +[general] +api_key = AAA +web_server_user = www-data +airtime_dir = /usr/share/airtime/ +base_url = localhost +base_port = 80 + +[soundcloud] +connection_retries = 3 +time_between_retries = 60 diff --git a/install_minimal/upgrades/airtime-1.9.3/api_client.cfg.193 b/install_minimal/upgrades/airtime-1.9.3/api_client.cfg.193 new file mode 100644 index 000000000..7c94e34c2 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.3/api_client.cfg.193 @@ -0,0 +1,110 @@ +bin_dir = "/usr/lib/airtime/api_clients" + +############################# +## Common +############################# + +# Value needed to access the API +api_key = 'AAA' + +# Path to the base of the API +api_base = 'api' + +# URL to get the version number of the server API +version_url = 'version/api_key/%%api_key%%' + +# Hostname +base_url = 'localhost' +base_port = 80 + +############################# +## Config for Media Monitor +############################# + +# URL to setup the media monitor +media_setup_url = 'media-monitor-setup/format/json/api_key/%%api_key%%' + +# Tell Airtime the file id associated with a show instance. +upload_recorded = 'upload-recorded/format/json/api_key/%%api_key%%/fileid/%%fileid%%/showinstanceid/%%showinstanceid%%' + +# URL to tell Airtime to update file's meta data +update_media_url = 'reload-metadata/format/json/api_key/%%api_key%%/mode/%%mode%%' + +# URL to tell Airtime we want a listing of all files it knows about +list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%' + +# URL to tell Airtime we want a listing of all dirs its watching (including the stor dir) +list_all_watched_dirs = 'list-all-watched-dirs/format/json/api_key/%%api_key%%' + +# URL to tell Airtime we want to add watched directory +add_watched_dir = 'add-watched-dir/format/json/api_key/%%api_key%%/path/%%path%%' + +# URL to tell Airtime we want to add watched directory +remove_watched_dir = 'remove-watched-dir/format/json/api_key/%%api_key%%/path/%%path%%' + +# URL to tell Airtime we want to add watched directory +set_storage_dir = 'set-storage-dir/format/json/api_key/%%api_key%%/path/%%path%%' + + +############################# +## Config for Recorder +############################# + +# URL to get the schedule of shows set to record +show_schedule_url = 'recorded-shows/format/json/api_key/%%api_key%%' + +# URL to upload the recorded show's file to Airtime +upload_file_url = 'upload-file/format/json/api_key/%%api_key%%' + +#number of retries to upload file if connection problem +upload_retries = 3 + +#time to wait between attempts to upload file if connection problem (in seconds) +upload_wait = 60 + +################################################################################ +# Uncomment *one of the sets* of values from the API clients below, and comment +# out all the others. +################################################################################ + +############################# +## Config for Pypo +############################# + +# Schedule export path. +# %%from%% - starting date/time in the form YYYY-MM-DD-hh-mm +# %%to%% - starting date/time in the form YYYY-MM-DD-hh-mm +export_url = 'schedule/api_key/%%api_key%%' + +get_media_url = 'get-media/file/%%file%%/api_key/%%api_key%%' + +# Update whether a schedule group has begun playing. +update_item_url = 'notify-schedule-group-play/api_key/%%api_key%%/schedule_id/%%schedule_id%%' + +# Update whether an audio clip is currently playing. +update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/schedule_id/%%schedule_id%%' + +# ??? +generate_range_url = 'generate_range_dp.php' + + +############## +# OBP config # +############## + +# URL to get the version number of the server API +#version_url = 'api/pypo/status/json' + +# Schedule export path. +# %%from%% - starting date/time in the form YYYY-MM-DD-hh-mm +# %%to%% - starting date/time in the form YYYY-MM-DD-hh-mm + +# Update whether an item has been played. +#update_item_url = 'api/pypo/update_shedueled_item/$$item_id%%?played=%%played%%' + +# Update whether an item is currently playing. +#update_start_playing_url = 'api/pypo/mod/medialibrary/?playlist_type=%%playlist_type%%&export_source=%%export_source%%&media_id=%%media_id%%&playlist_id=%%playlist_id%%&transmission_id=%%transmission_id%%' + +# ??? +#generate_range_url = 'api/pypo/generate_range_dp/' + diff --git a/install_minimal/upgrades/airtime-1.9.3/liquidsoap.cfg.193 b/install_minimal/upgrades/airtime-1.9.3/liquidsoap.cfg.193 new file mode 100644 index 000000000..ef4b26b62 --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.3/liquidsoap.cfg.193 @@ -0,0 +1,55 @@ +########################################### +# Liquidsoap config file # +########################################### + +########################################### +# Output settings # +########################################### +output_sound_device = false +output_icecast_vorbis = true +output_icecast_mp3 = false +output_shoutcast = false + +#output_bitrate = 128 +#output_samplerate = 44100 +#output_stereo = true + +########################################### +# Logging settings # +########################################### +log_file = "/var/log/airtime/pypo-liquidsoap/