From 97805ad271d935b1e056b7abb4b48e0379657d18 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 17 Dec 2014 16:22:40 -0500 Subject: [PATCH] Removed many unnecessary files and started changing pypo to use setuptools --- install_full/apache/airtime-vhost | 12 - install_full/debian/airtime-full-install | 14 - install_full/nginx/airtime-vhost | 56 - install_full/php5-fpm/airtime.conf | 250 --- install_full/php5/airtime.ini | 8 - install_full/ubuntu/airtime-full-install | 216 -- .../ubuntu/airtime-full-install-nginx | 10 - .../Version20110312121200.php | 19 - .../Version20110331111708.php | 96 - .../Version20110402164819.php | 28 - .../Version20110406182005.php | 47 - .../Version20110629143017.php | 30 - .../Version20110711161043.php | 51 - .../Version20110713161043.php | 26 - .../Version20110829143306.php | 27 - .../Version20110922153933.php | 23 - .../Version20110925171051.php | 26 - .../Version20110925171256.php | 29 - .../Version20110929184401.php | 23 - .../Version20111102142811.php | 25 - .../Version20111103141311.php | 21 - .../Version20111114222927.php | 20 - .../Version20120613123039.php | 20 - .../DoctrineMigrations/migrations.xml | 15 - install_minimal/airtime-dircheck.php | 5 - install_minimal/airtime-install | 253 --- install_minimal/airtime-php.ini | 1854 ----------------- install_minimal/airtime-uninstall | 66 - install_minimal/include/AirtimeIni.php | 349 ---- install_minimal/include/AirtimeInstall.php | 500 ----- install_minimal/include/airtime-constants.php | 3 - install_minimal/include/airtime-copy-files.sh | 111 - .../include/airtime-db-install.php | 84 - install_minimal/include/airtime-initialize.sh | 67 - install_minimal/include/airtime-install.ini | 1 - install_minimal/include/airtime-install.php | 88 - .../include/airtime-installed-check.php | 48 - .../include/airtime-remove-files.sh | 45 - .../include/airtime-uninitialize.sh | 31 - install_minimal/include/airtime-uninstall.php | 107 - install_minimal/include/airtime-upgrade.php | 105 - .../airtime-2.2.0/ConfFileUpgrade.php | 16 - .../upgrades/airtime-2.2.0/DbUpgrade.php | 24 - install_minimal/upgrades/airtime-2.2.0/TODO | 9 - .../airtime-2.2.0/airtime-upgrade.php | 11 - .../airtime-2.2.0/common/UpgradeCommon.php | 322 --- .../upgrades/airtime-2.2.0/data/upgrade.sql | 227 -- .../airtime-2.2.0/etc/airtime.conf.220 | 31 - .../airtime-2.2.0/etc/api_client.cfg.220 | 121 -- .../airtime-2.2.0/etc/media-monitor.cfg.220 | 31 - .../upgrades/airtime-2.2.0/etc/pypo.cfg.220 | 85 - .../upgrades/airtime-2.2.1/DbUpgrade.php | 24 - .../airtime-2.2.1/airtime-upgrade.php | 8 - .../upgrades/airtime-2.2.1/data/upgrade.sql | 9 - .../airtime-2.3.0/ConfFileUpgrade.php | 16 - .../upgrades/airtime-2.3.0/DbUpgrade.php | 25 - .../airtime-2.3.0/airtime-upgrade.php | 11 - .../airtime-2.3.0/common/UpgradeCommon.php | 322 --- .../upgrades/airtime-2.3.0/data/schema.sql | 93 - .../upgrades/airtime-2.3.0/data/upgrade.sql | 47 - .../airtime-2.3.0/etc/airtime.conf.230 | 32 - .../airtime-2.3.0/etc/api_client.cfg.230 | 128 -- .../airtime-2.3.0/etc/media-monitor.cfg.230 | 31 - .../upgrades/airtime-2.3.0/etc/pypo.cfg.230 | 85 - .../upgrades/airtime-2.3.1/DbUpgrade.php | 25 - .../airtime-2.3.1/airtime-upgrade.php | 15 - .../airtime-2.3.1/common/UpgradeCommon.php | 312 --- .../upgrades/airtime-2.3.1/data/upgrade.sql | 2 - .../airtime-2.4.0/ConfFileUpgrade.php | 28 - .../upgrades/airtime-2.4.0/DbUpgrade.php | 25 - .../airtime-2.4.0/airtime-upgrade.php | 11 - .../airtime-2.4.0/common/UpgradeCommon.php | 98 - .../upgrades/airtime-2.4.0/data/schema.sql | 17 - .../upgrades/airtime-2.4.0/data/upgrade.sql | 32 - .../upgrades/airtime-2.4.0/etc/api_client.cfg | 12 - .../upgrades/airtime-2.4.1/DbUpgrade.php | 24 - .../airtime-2.4.1/airtime-upgrade.php | 8 - .../upgrades/airtime-2.4.1/data/upgrade.sql | 3 - .../upgrades/airtime-2.5.0/DbUpgrade.php | 25 - .../airtime-2.5.0/airtime-upgrade.php | 8 - .../upgrades/airtime-2.5.0/data/schema.sql | 83 - .../upgrades/airtime-2.5.0/data/upgrade.sql | 69 - .../upgrades/airtime-2.5.1/DbUpgrade.php | 24 - .../airtime-2.5.1/airtime-upgrade.php | 8 - .../upgrades/airtime-2.5.1/data/upgrade.sql | 2 - .../upgrades/airtime-2.5.2/data/upgrade.sql | 8 - .../upgrade-template/UpgradeCommon.php | 235 --- .../upgrade-template/airtime-upgrade.php | 82 - installer/install | 12 +- python_apps/api_clients/api_client.cfg | 12 - .../api_clients/install/api_client_install.py | 31 - .../install/api_client_uninstall.py | 21 - python_apps/create-pypo-user.py | 32 - .../install/media-monitor-copy-files.py | 70 - .../install/media-monitor-initialize.py | 21 - .../install/media-monitor-remove-files.py | 44 - .../install/media-monitor-uninitialize.py | 19 - .../install/media-monitor-uninstall.py | 50 - .../monit-airtime-media-monitor.cfg | 9 - .../media-monitor2/configs/airtime.conf | 32 - .../media-monitor2/configs/api_client.cfg | 126 -- .../media-monitor2/configs/media-monitor.cfg | 31 - python_apps/monit/monit-airtime-generic.cfg | 6 - .../monit/monit-airtime-rabbitmq-server.cfg | 7 - python_apps/pypo/install/pypo-copy-files.py | 140 -- python_apps/pypo/install/pypo-initialize.py | 95 - python_apps/pypo/install/pypo-remove-files.py | 54 - python_apps/pypo/install/pypo-uninitialize.py | 33 - python_apps/pypo/liquidsoap_bin | 1 - python_apps/pypo/monit-airtime-liquidsoap.cfg | 17 - python_apps/pypo/monit-airtime-playout.cfg | 9 - .../pypo/monit-pre530-airtime-liquidsoap.cfg | 8 - python_apps/pypo/{ => pypo}/AUTHORS | 0 python_apps/pypo/{ => pypo}/LICENSE | 0 python_apps/pypo/{ => pypo}/__init__.py | 0 .../pypo/{ => pypo}/airtime-liquidsoap | 0 .../pypo/{ => pypo}/airtime-liquidsoap-init-d | 31 - python_apps/pypo/{ => pypo}/airtime-playout | 0 .../pypo/{ => pypo}/airtime-playout-init-d | 22 - python_apps/pypo/{ => pypo}/eventtypes.py | 0 .../{ => pypo}/liquidsoap_scripts/aac.liq | 0 .../{ => pypo}/liquidsoap_scripts/aacplus.liq | 0 .../airtime-liquidsoap.logrotate | 0 .../{ => pypo}/liquidsoap_scripts/fdkaac.liq | 0 .../generate_liquidsoap_cfg.py | 0 .../liquidsoap_scripts/library/externals.liq | 0 .../liquidsoap_scripts/library/flows.liq | 0 .../liquidsoap_scripts/library/gstreamer.liq | 0 .../liquidsoap_scripts/library/http.liq | 0 .../liquidsoap_scripts/library/http_codes.liq | 0 .../liquidsoap_scripts/library/lastfm.liq | 0 .../liquidsoap_scripts/library/pervasives.liq | 0 .../liquidsoap_scripts/library/shoutcast.liq | 0 .../liquidsoap_scripts/library/utils.liq | 0 .../liquidsoap_scripts/library/video_text.liq | 0 .../liquidsoap_scripts/liquidsoap.cfg | 0 .../liquidsoap_scripts/liquidsoap_auth.py | 0 .../liquidsoap_prepare_terminate.py | 0 .../{ => pypo}/liquidsoap_scripts/ls_lib.liq | 0 .../liquidsoap_scripts/ls_script.liq | 0 .../{ => pypo}/liquidsoap_scripts/mp3.liq | 0 .../{ => pypo}/liquidsoap_scripts/notify.sh | 0 .../{ => pypo}/liquidsoap_scripts/ogg.liq | 0 .../{ => pypo}/liquidsoap_scripts/opus.liq | 0 python_apps/pypo/{ => pypo}/listenerstat.py | 0 python_apps/pypo/{ => pypo}/logging.cfg | 0 python_apps/pypo/{ => pypo}/media/__init__.py | 0 .../pypo/{ => pypo}/media/update/__init__.py | 0 .../{ => pypo}/media/update/replaygain.py | 0 .../media/update/replaygainupdater.py | 0 .../{ => pypo}/media/update/silananalyzer.py | 0 .../pypo/{ => pypo}/notify_logging.cfg | 0 python_apps/pypo/{ => pypo}/pure.py | 0 python_apps/pypo/{ => pypo}/pypo.cfg | 0 python_apps/pypo/{ => pypo}/pypocli.py | 0 python_apps/pypo/{ => pypo}/pypofetch.py | 0 python_apps/pypo/{ => pypo}/pypofile.py | 0 python_apps/pypo/{ => pypo}/pypoliqqueue.py | 0 python_apps/pypo/{ => pypo}/pypoliquidsoap.py | 0 .../pypo/{ => pypo}/pypomessagehandler.py | 0 python_apps/pypo/{ => pypo}/pyponotify.py | 0 python_apps/pypo/{ => pypo}/pypopush.py | 0 python_apps/pypo/{ => pypo}/recorder.py | 0 .../pypo/{ => pypo}/telnetliquidsoap.py | 0 .../pypo/{ => pypo}/testpypoliqqueue.py | 0 .../pypo/{ => pypo}/tests/run_tests.sh | 0 .../{ => pypo}/tests/test_modify_cue_in.py | 0 python_apps/pypo/{ => pypo}/timeout.py | 0 python_apps/remove-pypo-user.py | 19 - 169 files changed, 5 insertions(+), 8620 deletions(-) delete mode 100644 install_full/apache/airtime-vhost delete mode 100755 install_full/debian/airtime-full-install delete mode 100644 install_full/nginx/airtime-vhost delete mode 100644 install_full/php5-fpm/airtime.conf delete mode 100644 install_full/php5/airtime.ini delete mode 100755 install_full/ubuntu/airtime-full-install delete mode 100755 install_full/ubuntu/airtime-full-install-nginx delete mode 100644 install_minimal/DoctrineMigrations/Version20110312121200.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110331111708.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110402164819.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110406182005.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110629143017.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110711161043.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110713161043.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110829143306.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110922153933.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110925171051.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110925171256.php delete mode 100644 install_minimal/DoctrineMigrations/Version20110929184401.php delete mode 100644 install_minimal/DoctrineMigrations/Version20111102142811.php delete mode 100644 install_minimal/DoctrineMigrations/Version20111103141311.php delete mode 100644 install_minimal/DoctrineMigrations/Version20111114222927.php delete mode 100644 install_minimal/DoctrineMigrations/Version20120613123039.php delete mode 100644 install_minimal/DoctrineMigrations/migrations.xml delete mode 100644 install_minimal/airtime-dircheck.php delete mode 100755 install_minimal/airtime-install delete mode 100644 install_minimal/airtime-php.ini delete mode 100755 install_minimal/airtime-uninstall delete mode 100644 install_minimal/include/AirtimeIni.php delete mode 100644 install_minimal/include/AirtimeInstall.php delete mode 100644 install_minimal/include/airtime-constants.php delete mode 100755 install_minimal/include/airtime-copy-files.sh delete mode 100644 install_minimal/include/airtime-db-install.php delete mode 100755 install_minimal/include/airtime-initialize.sh delete mode 100644 install_minimal/include/airtime-install.ini delete mode 100644 install_minimal/include/airtime-install.php delete mode 100644 install_minimal/include/airtime-installed-check.php delete mode 100755 install_minimal/include/airtime-remove-files.sh delete mode 100755 install_minimal/include/airtime-uninitialize.sh delete mode 100644 install_minimal/include/airtime-uninstall.php delete mode 100644 install_minimal/include/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.0/ConfFileUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.0/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.0/TODO delete mode 100644 install_minimal/upgrades/airtime-2.2.0/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.0/common/UpgradeCommon.php delete mode 100644 install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.2.0/etc/airtime.conf.220 delete mode 100644 install_minimal/upgrades/airtime-2.2.0/etc/api_client.cfg.220 delete mode 100644 install_minimal/upgrades/airtime-2.2.0/etc/media-monitor.cfg.220 delete mode 100644 install_minimal/upgrades/airtime-2.2.0/etc/pypo.cfg.220 delete mode 100644 install_minimal/upgrades/airtime-2.2.1/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.1/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.2.1/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.3.0/ConfFileUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.3.0/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.3.0/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.3.0/common/UpgradeCommon.php delete mode 100644 install_minimal/upgrades/airtime-2.3.0/data/schema.sql delete mode 100644 install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.3.0/etc/airtime.conf.230 delete mode 100644 install_minimal/upgrades/airtime-2.3.0/etc/api_client.cfg.230 delete mode 100644 install_minimal/upgrades/airtime-2.3.0/etc/media-monitor.cfg.230 delete mode 100644 install_minimal/upgrades/airtime-2.3.0/etc/pypo.cfg.230 delete mode 100644 install_minimal/upgrades/airtime-2.3.1/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.3.1/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.3.1/common/UpgradeCommon.php delete mode 100644 install_minimal/upgrades/airtime-2.3.1/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.4.0/ConfFileUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.0/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.0/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.0/common/UpgradeCommon.php delete mode 100644 install_minimal/upgrades/airtime-2.4.0/data/schema.sql delete mode 100644 install_minimal/upgrades/airtime-2.4.0/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.4.0/etc/api_client.cfg delete mode 100644 install_minimal/upgrades/airtime-2.4.1/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.1/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.0/data/schema.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.0/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.1/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.1/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.1/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.2/data/upgrade.sql delete mode 100644 install_minimal/upgrades/upgrade-template/UpgradeCommon.php delete mode 100644 install_minimal/upgrades/upgrade-template/airtime-upgrade.php delete mode 100644 python_apps/api_clients/api_client.cfg delete mode 100644 python_apps/api_clients/install/api_client_install.py delete mode 100644 python_apps/api_clients/install/api_client_uninstall.py delete mode 100644 python_apps/create-pypo-user.py delete mode 100644 python_apps/media-monitor/install/media-monitor-copy-files.py delete mode 100644 python_apps/media-monitor/install/media-monitor-initialize.py delete mode 100644 python_apps/media-monitor/install/media-monitor-remove-files.py delete mode 100644 python_apps/media-monitor/install/media-monitor-uninitialize.py delete mode 100644 python_apps/media-monitor/install/media-monitor-uninstall.py delete mode 100644 python_apps/media-monitor/monit-airtime-media-monitor.cfg delete mode 100644 python_apps/media-monitor2/configs/airtime.conf delete mode 100644 python_apps/media-monitor2/configs/api_client.cfg delete mode 100644 python_apps/media-monitor2/configs/media-monitor.cfg delete mode 100644 python_apps/monit/monit-airtime-generic.cfg delete mode 100644 python_apps/monit/monit-airtime-rabbitmq-server.cfg delete mode 100644 python_apps/pypo/install/pypo-copy-files.py delete mode 100644 python_apps/pypo/install/pypo-initialize.py delete mode 100644 python_apps/pypo/install/pypo-remove-files.py delete mode 100644 python_apps/pypo/install/pypo-uninitialize.py delete mode 160000 python_apps/pypo/liquidsoap_bin delete mode 100644 python_apps/pypo/monit-airtime-liquidsoap.cfg delete mode 100644 python_apps/pypo/monit-airtime-playout.cfg delete mode 100644 python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg rename python_apps/pypo/{ => pypo}/AUTHORS (100%) rename python_apps/pypo/{ => pypo}/LICENSE (100%) rename python_apps/pypo/{ => pypo}/__init__.py (100%) rename python_apps/pypo/{ => pypo}/airtime-liquidsoap (100%) rename python_apps/pypo/{ => pypo}/airtime-liquidsoap-init-d (75%) rename python_apps/pypo/{ => pypo}/airtime-playout (100%) rename python_apps/pypo/{ => pypo}/airtime-playout-init-d (75%) rename python_apps/pypo/{ => pypo}/eventtypes.py (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/aac.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/aacplus.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/airtime-liquidsoap.logrotate (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/fdkaac.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/generate_liquidsoap_cfg.py (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/externals.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/flows.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/gstreamer.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/http.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/http_codes.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/lastfm.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/pervasives.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/shoutcast.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/utils.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/library/video_text.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/liquidsoap.cfg (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/liquidsoap_auth.py (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/liquidsoap_prepare_terminate.py (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/ls_lib.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/ls_script.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/mp3.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/notify.sh (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/ogg.liq (100%) rename python_apps/pypo/{ => pypo}/liquidsoap_scripts/opus.liq (100%) rename python_apps/pypo/{ => pypo}/listenerstat.py (100%) rename python_apps/pypo/{ => pypo}/logging.cfg (100%) rename python_apps/pypo/{ => pypo}/media/__init__.py (100%) rename python_apps/pypo/{ => pypo}/media/update/__init__.py (100%) rename python_apps/pypo/{ => pypo}/media/update/replaygain.py (100%) rename python_apps/pypo/{ => pypo}/media/update/replaygainupdater.py (100%) rename python_apps/pypo/{ => pypo}/media/update/silananalyzer.py (100%) rename python_apps/pypo/{ => pypo}/notify_logging.cfg (100%) rename python_apps/pypo/{ => pypo}/pure.py (100%) rename python_apps/pypo/{ => pypo}/pypo.cfg (100%) rename python_apps/pypo/{ => pypo}/pypocli.py (100%) rename python_apps/pypo/{ => pypo}/pypofetch.py (100%) rename python_apps/pypo/{ => pypo}/pypofile.py (100%) rename python_apps/pypo/{ => pypo}/pypoliqqueue.py (100%) rename python_apps/pypo/{ => pypo}/pypoliquidsoap.py (100%) rename python_apps/pypo/{ => pypo}/pypomessagehandler.py (100%) rename python_apps/pypo/{ => pypo}/pyponotify.py (100%) rename python_apps/pypo/{ => pypo}/pypopush.py (100%) rename python_apps/pypo/{ => pypo}/recorder.py (100%) rename python_apps/pypo/{ => pypo}/telnetliquidsoap.py (100%) rename python_apps/pypo/{ => pypo}/testpypoliqqueue.py (100%) rename python_apps/pypo/{ => pypo}/tests/run_tests.sh (100%) rename python_apps/pypo/{ => pypo}/tests/test_modify_cue_in.py (100%) rename python_apps/pypo/{ => pypo}/timeout.py (100%) delete mode 100644 python_apps/remove-pypo-user.py diff --git a/install_full/apache/airtime-vhost b/install_full/apache/airtime-vhost deleted file mode 100644 index 1f42bdf02..000000000 --- a/install_full/apache/airtime-vhost +++ /dev/null @@ -1,12 +0,0 @@ - - ServerAdmin foo@bar.org - DocumentRoot /usr/share/airtime/public - php_admin_value upload_tmp_dir /tmp - - - DirectoryIndex index.php - AllowOverride all - Order allow,deny - Allow from all - - diff --git a/install_full/debian/airtime-full-install b/install_full/debian/airtime-full-install deleted file mode 100755 index 805f1ee7e..000000000 --- a/install_full/debian/airtime-full-install +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# -# Auto install script for airtime on Debian - - -#Current dir -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` - -cd $SCRIPTPATH/../ubuntu -./airtime-full-install - diff --git a/install_full/nginx/airtime-vhost b/install_full/nginx/airtime-vhost deleted file mode 100644 index 069bf970a..000000000 --- a/install_full/nginx/airtime-vhost +++ /dev/null @@ -1,56 +0,0 @@ -# This file is contributed by Eugene MechanisM -# Link to the post: -# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files - -upstream php5-fpm { - ip_hash; - server unix:/var/run/airtime.php.sock; -} -server { - listen 80; - server_name airtime; #change to your host - include mime.types; - root /usr/share/airtime/public; - access_log /var/log/airtime.access.log; - error_log /var/log/airtime.error.log; - index index.php; - include fastcgi_params; - client_max_body_size 1G; - - location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ { - expires max; - access_log off; - add_header Pragma public; - add_header Cache-Control "public, must-revalidate, proxy-revalidate"; - } - location / { - if (-e $request_filename){ - set $rule_0 1; - } - if ($request_filename ~ "-l"){ - set $rule_0 1; - } - if (-d $request_filename){ - set $rule_0 1; - } - rewrite ^/.*$ /index.php last; - try_files $uri $uri/ index.php; - - } - location ~ \.php$ { - include fastcgi_params; - fastcgi_pass php5-fpm; - } - location = /favicon.ico { - log_not_found off; - access_log off; - } - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - location ~ /\.ht { - deny all; - } -} diff --git a/install_full/php5-fpm/airtime.conf b/install_full/php5-fpm/airtime.conf deleted file mode 100644 index cb0e2f335..000000000 --- a/install_full/php5-fpm/airtime.conf +++ /dev/null @@ -1,250 +0,0 @@ -# NGINX changes are contributed by Eugene MechanisM -# Link to the post: -# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files - -; Start a new pool named 'airtime'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('airtime' here) -[airtime] - -; Per pool prefix -; It only applies on the following directives: -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = '/var/run/airtime.php.sock' - -; Set listen(2) backlog. A value of '-1' means unlimited. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = -1 - -; List of ipv4 addresses of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0666 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0666 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = www-data -group = www-data - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives: -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes to be created when pm is set to 'dynamic'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. -; Note: Used when pm is set to either 'static' or 'dynamic' -; Note: This value is mandatory. -pm.max_children = 10 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 4 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 2 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 6 - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. By default, the status page shows the following -; information: -; accepted conn - the number of request accepted by the pool; -; pool - the name of the pool; -; process manager - static or dynamic; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes. -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic') -; The values of 'idle processes', 'active processes' and 'total processes' are -; updated each second. The value of 'accepted conn' is updated in real time. -; Example output: -; accepted conn: 12073 -; pool: www -; process manager: static -; idle processes: 35 -; active processes: 65 -; total processes: 100 -; max children reached: 1 -; By default the status page output is formatted as text/plain. Passing either -; 'html' or 'json' as a query string will return the corresponding output -; syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 0 - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -;catch_workers_output = yes - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M - -php_admin_value[error_log] = /var/log/airtime.php-fpm.error.log -php_admin_value[post_max_size] = 500M -php_admin_value[upload_max_filesize] = 500M -php_admin_value[request_order] = GPC -php_admin_value[session.gc_probability] = 0 -php_admin_value[upload_tmp_dir] = /tmp diff --git a/install_full/php5/airtime.ini b/install_full/php5/airtime.ini deleted file mode 100644 index 829e5edd0..000000000 --- a/install_full/php5/airtime.ini +++ /dev/null @@ -1,8 +0,0 @@ -[PHP] -memory_limit = 512M -magic_quotes_gpc = Off -file_uploads = On -upload_tmp_dir = /tmp -apc.write_lock = 1 -apc.slam_defense = 0 - diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install deleted file mode 100755 index 5bd4a6485..000000000 --- a/install_full/ubuntu/airtime-full-install +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/bash -e -# -# Auto install script for airtime on Ubuntu -# -# NGINX changes are contributed by Eugene MechanisM -# Link to the post: -# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files - -exec > >(tee install_log.txt) -exec 2>&1 - -if [ "$(id -u)" != "0" ]; then - echo "Please run as root user." - exit 1 -fi - -server="$1" - -#Current dir -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` - -#Prerequisite -echo "----------------------------------------------------" -echo " 1. Install Packages" -echo "----------------------------------------------------" - -dist=`lsb_release -is` -code=`lsb_release -cs` - -#enable squeeze backports to get lame packages -if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then - set +e - grep -E "deb http://backports.debian.org/debian-backports squeeze-backports main" /etc/apt/sources.list - returncode=$? - set -e - if [ "$returncode" -ne "0" ]; then - echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list - fi -fi - -codename=`lsb_release -sc` -set +e -grep -E "deb +http://apt.sourcefabric.org/? +$codename +main" /etc/apt/sources.list -returncode=$? -set -e -if [ "$returncode" != "0" ]; then - echo "deb http://apt.sourcefabric.org/ $codename main" >> /etc/apt/sources.list -fi - -apt-get update - -# Updated package list -apt-get -y --force-yes install tar gzip curl php5-pgsql \ -php-pear php5-gd postgresql odbc-postgresql python libsoundtouch-ocaml \ -libtaglib-ocaml libao-ocaml libmad-ocaml ecasound \ -libesd0 libportaudio2 libsamplerate0 rabbitmq-server patch \ -php5-curl mpg123 monit python-virtualenv multitail libcamomile-ocaml-data \ -libpulse0 vorbis-tools lsb-release lsof sudo mp3gain vorbisgain flac vorbis-tools \ -pwgen libfaad2 php-apc - - -#install packages with --force-yes option (this is useful in the case -#of Debian, where these packages are unauthorized) -apt-get -y --force-yes install libmp3lame-dev lame icecast2 - -#Debian Squeeze only has zendframework package. Newer versions of Ubuntu have zend-framework package. -#Ubuntu Lucid has both zendframework and zend-framework. Difference appears to be that zendframework is for -#1.10 and zend-framework is 1.11 -if [ "$dist" = "Debian" ]; then - apt-get -y --force-yes install zendframework -else - apt-get -y --force-yes install libzend-framework-php -fi - -#get the "timeout" unix command -if [ "$code" = "lucid" ]; then - apt-get -y --force-yes install timeout -else - apt-get -y --force-yes install coreutils -fi - -#install aac package only available in new distributions: (Debian Wheezy, Ubuntu Precise or newer) -if [ "$code" != "squeeze" -a "$code" != "lucid" ]; then - apt-get -y --force-yes install libvo-aacenc0 -fi - -#Install some plugin packages on Ubuntu Saucy. -if [ "$dist" = "Ubuntu" -a "$code" = "saucy" ]; then - apt-get -y --force-yes install php5-json - apt-get -y --force-yes install liquidsoap-plugin-alsa liquidsoap-plugin-ao liquidsoap-plugin-faad liquidsoap-plugin-flac liquidsoap-plugin-icecast liquidsoap-plugin-lame liquidsoap-plugin-mad liquidsoap-plugin-ogg liquidsoap-plugin-opus liquidsoap-plugin-portaudio liquidsoap-plugin-pulseaudio liquidsoap-plugin-taglib liquidsoap-plugin-voaacenc liquidsoap-plugin-vorbis - -fi - -#Install packages back-ported by Sourcefabric -apt-get -y --force-yes install sourcefabric-keyring -apt-get -y --force-yes install liquidsoap -apt-get -y --force-yes install silan -apt-get -y --force-yes install libopus0 - -if [ "$server" = "nginx" ]; then - apt-get -y --force-yes install nginx php5-fpm - # NGINX Config File - echo "----------------------------------------------------" - echo "2.1 NGINX Config File" - echo "----------------------------------------------------" - if [ ! -f /etc/nginx/sites-available/airtime ]; then - cp $SCRIPTPATH/../nginx/airtime-vhost /etc/nginx/sites-available/airtime - ln -s /etc/nginx/sites-available/airtime /etc/nginx/sites-enabled/airtime - service nginx reload - else - echo "NGINX config for Airtime already exists..." - fi - - # php-fpm Airtime pool file - echo "----------------------------------------------------" - echo "2.2 Airtime php pool file" - echo "----------------------------------------------------" - if [ ! -f /etc/php5/fpm/pool.d/airtime.conf ]; then - cp $SCRIPTPATH/../php5-fpm/airtime.conf /etc/php5/fpm/pool.d/airtime.conf - service php5-fpm reload - else - echo "Airtime php pool file already exists..." - fi -else - apt-get -y --force-yes install apache2 libapache2-mod-php5 - set +e - apache2 -v | grep "2\.4" > /dev/null - apacheversion=$? - set -e - - - # Apache Config File - echo "----------------------------------------------------" - echo "2.1 Apache Config File" - echo "----------------------------------------------------" - - if [ "$apacheversion" != "1" ]; then - airtimeconfigfile="airtime.conf" - else - airtimeconfigfile="airtime" - fi - - if [ ! -f /etc/apache2/sites-available/$airtimeconfigfile ]; then - echo "Creating Apache config for Airtime..." - - cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/$airtimeconfigfile - a2dissite 000-default - a2ensite airtime - else - echo "Apache config for Airtime already exists..." - fi - - if [ ! -d /usr/share/airtime/public ]; then - echo "Creating Apache web root directory..." - mkdir -p /usr/share/airtime/public/ - else - echo "Airtime web root directory already exists..." - fi - - # PHP Config File for Apache - echo "----------------------------------------------------" - echo "2.2 PHP Config File for Apache" - echo "----------------------------------------------------" - if [ ! -f /etc/php5/apache2/airtime.ini ]; then - echo "Creating Airtime PHP config for Apache..." - cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/conf.d/airtime.ini - else - echo "Airtime PHP config for Apache already exists..." - fi - - # Enable modules and restart Apache to enable any configuration changes - echo "----------------------------------------------------" - echo "2.3 Enable Apache Modules and Restart Apache" - echo "----------------------------------------------------" - a2enmod rewrite php5 - service apache2 restart -fi - -# Enable Icecast -echo "----------------------------------------------------" -echo "3. Enable Icecast" -echo "----------------------------------------------------" -cd /etc/default/ -sed -i 's/ENABLE=false/ENABLE=true/g' icecast2 -set +e -service icecast2 start -set -e -echo "" - -# Enable Monit -echo "----------------------------------------------------" -echo "4. Enable Monit" -echo "----------------------------------------------------" -cd /etc/default/ -sed -i 's/startup=0/startup=1/g' monit - -set +e -grep -q "include /etc/monit/conf.d" /etc/monit/monitrc -RETVAL=$? -set -e -if [ $RETVAL -ne 0 ] ; then - mkdir -p /etc/monit/conf.d - echo "include /etc/monit/conf.d/*" >> /etc/monit/monitrc -fi - -# Run Airtime Install -echo "----------------------------------------------------" -echo "5. Run Airtime Install" -echo "----------------------------------------------------" -cd $SCRIPTPATH/../../install_minimal -# Restart apache to clear php cache -service apache2 restart -./airtime-install diff --git a/install_full/ubuntu/airtime-full-install-nginx b/install_full/ubuntu/airtime-full-install-nginx deleted file mode 100755 index 7f55a3aa2..000000000 --- a/install_full/ubuntu/airtime-full-install-nginx +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Auto install script for airtime + nginx - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` - -$SCRIPTPATH/airtime-full-install nginx - diff --git a/install_minimal/DoctrineMigrations/Version20110312121200.php b/install_minimal/DoctrineMigrations/Version20110312121200.php deleted file mode 100644 index 8bf20d856..000000000 --- a/install_minimal/DoctrineMigrations/Version20110312121200.php +++ /dev/null @@ -1,19 +0,0 @@ -dropTable("cc_backup"); - $schema->dropTable("cc_trans"); - } - - public function down(Schema $schema) - { - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110331111708.php b/install_minimal/DoctrineMigrations/Version20110331111708.php deleted file mode 100644 index d355566a9..000000000 --- a/install_minimal/DoctrineMigrations/Version20110331111708.php +++ /dev/null @@ -1,96 +0,0 @@ -getTable('cc_show_instances'); - - $show_instances_table->addColumn('record', 'smallint', array('notnull' => 0, 'default' => 0)); - $show_instances_table->addColumn('rebroadcast', 'smallint', array('notnull' => 0, 'default' => 0)); - $show_instances_table->addColumn('instance_id', 'integer', array('notnull' => 0)); - $show_instances_table->addColumn('file_id', 'integer', array('notnull' => 0)); - $show_instances_table->addColumn('soundcloud_id', 'integer', array('notnull' => 0)); - - $show_instances_table->addNamedForeignKeyConstraint('cc_original_show_instance_fkey', $show_instances_table, array('instance_id'), array('id'), array('onDelete' => 'CASCADE')); - - $files_table = $schema->getTable('cc_files'); - $show_instances_table->addNamedForeignKeyConstraint('cc_recorded_file_fkey', $files_table, array('file_id'), array('id'), array('onDelete' => 'CASCADE')); - //end cc_show_instances modifications - - //start cc_show_days modifications - $show_days_table = $schema->getTable('cc_show_days'); - - $show_days_table->addColumn('record', 'smallint', array( 'notnull' => 0, 'default' => 0)); - //end cc_show_days modifications - - //start cc_show modifications - $show_table = $schema->getTable('cc_show'); - - $show_table->addColumn('url', 'string', array('notnull' => 0, 'length' => 255)); - //end cc_show modifications - - //start cc_schedule modifications - $schedule_table = $schema->getTable('cc_schedule'); - - $playlist_id_col = $schedule_table->getColumn('playlist_id'); - $playlist_id_col->setNotnull(false); - //end cc_schedule modifications - - //create cc_show_rebroadcast table - $cc_show_rebroadcast_table = $schema->createTable('cc_show_rebroadcast'); - - $cc_show_rebroadcast_table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $cc_show_rebroadcast_table->addColumn('day_offset', 'string', array('length' => 255)); - $cc_show_rebroadcast_table->addColumn('start_time', 'datetime', array('notnull' => 1)); - $cc_show_rebroadcast_table->addColumn('show_id', 'integer', array('notnull' => 1)); - - $cc_show_rebroadcast_table->setPrimaryKey(array('id')); - //end create cc_show_rebroadcast table - } - - public function down(Schema $schema) - { - //start cc_show_instances modifications - $show_instances_table = $schema->getTable('cc_show_instances'); - - $show_instances_table->dropColumn('record'); - $show_instances_table->dropColumn('rebroadcast'); - $show_instances_table->dropColumn('instance_id'); - $show_instances_table->dropColumn('file_id'); - $show_instances_table->dropColumn('soundcloud_id'); - //end cc_show_instances modifications - - //start cc_show_days modifications - $show_days_table = $schema->getTable('cc_show_days'); - - $show_days_table->dropColumn('record'); - //end cc_show_days modifications - - //start cc_show modifications - $show_table = $schema->getTable('cc_show'); - - $show_table->dropColumn('url'); - //end cc_show modifications - - //start cc_schedule modifications - $schedule_table = $schema->getTable('cc_schedule'); - - $playlist_id_col = $schedule_table->getColumn('playlist_id'); - $playlist_id_col->setNotnull(true); - //end cc_schedule modifications - - //drop cc_show_rebroadcast table - $schema->dropTable('cc_show_rebroadcast'); - //end drop cc_show_rebroadcast table - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110402164819.php b/install_minimal/DoctrineMigrations/Version20110402164819.php deleted file mode 100644 index d4e84145c..000000000 --- a/install_minimal/DoctrineMigrations/Version20110402164819.php +++ /dev/null @@ -1,28 +0,0 @@ -getTable('cc_show'); - - $show_table->addColumn('genre', 'string', array('notnull' => 0, 'length' => 255, 'default' => "")); - //end cc_show modifications - - } - - public function down(Schema $schema) - { - //start cc_show modifications - $show_table = $schema->getTable('cc_show'); - - $show_table->dropColumn('genre'); - //end cc_show modifications - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110406182005.php b/install_minimal/DoctrineMigrations/Version20110406182005.php deleted file mode 100644 index 671b32c17..000000000 --- a/install_minimal/DoctrineMigrations/Version20110406182005.php +++ /dev/null @@ -1,47 +0,0 @@ -getTable('cc_show_instances'); - - $cc_show_instances->addColumn('time_filled', 'time', array('notnull' => false)); - //end cc_show_instances modifications - - //start cc_show_rebroadcast modifications - $cc_show_rebroadcast = $schema->getTable('cc_show_rebroadcast'); - - $type = $cc_show_rebroadcast->getColumn('start_time')->getType()->getName(); - if($type == 'datetime') { - $cc_show_rebroadcast->dropColumn('start_time'); - $cc_show_rebroadcast->addColumn('start_time', 'time', array('notnull' => true)); - } - //end cc_show_rebroadcast modifications - } - - public function down(Schema $schema) - { - //start cc_show_instances modifications - $cc_show_instances = $schema->getTable('cc_show_instances'); - - $cc_show_instances->dropColumn('time_filled'); - //end cc_show_instances modifications - - //start cc_show_rebroadcast modifications - $cc_show_rebroadcast = $schema->getTable('cc_show_rebroadcast'); - - $type = $cc_show_rebroadcast->getColumn('start_time')->getType()->getName(); - if($type == 'datetime') { - $cc_show_rebroadcast->dropColumn('start_time'); - $cc_show_rebroadcast->addColumn('start_time', 'datetime', array('notnull' => 1)); - } - //end cc_show_rebroadcast modifications - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110629143017.php b/install_minimal/DoctrineMigrations/Version20110629143017.php deleted file mode 100644 index 162a1772b..000000000 --- a/install_minimal/DoctrineMigrations/Version20110629143017.php +++ /dev/null @@ -1,30 +0,0 @@ -createTable('cc_music_dirs'); - - $cc_music_dirs->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $cc_music_dirs->addColumn('type', 'string', array('length' => 255)); - $cc_music_dirs->addColumn('directory', 'text', array('unique' => true)); - - $cc_music_dirs->setPrimaryKey(array('id')); - - //end create cc_music_dirs table - } - - - - public function down(Schema $schema) - { - $schema->dropTable('cc_music_dirs'); - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110711161043.php b/install_minimal/DoctrineMigrations/Version20110711161043.php deleted file mode 100644 index 388d31772..000000000 --- a/install_minimal/DoctrineMigrations/Version20110711161043.php +++ /dev/null @@ -1,51 +0,0 @@ -_addSql("INSERT INTO cc_music_dirs (type, directory) VALUES ('stor', $stor_dir);"); - - $this->_addSql("INSERT INTO cc_music_dirs (type, directory) VALUES ('link', '');"); - - $cc_music_dirs = $schema->getTable('cc_music_dirs'); - - /* 2) create a foreign key relationship from cc_files to cc_music_dirs */ - $cc_files = $schema->getTable('cc_files'); - $cc_files->addColumn('directory', 'integer', array('notnull' => 0, 'default'=> NULL)); - - $cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'), array('onDelete' => 'CASCADE')); - - // before 3) we have to delete all entries in cc_schedule with file_id that are not in cc_file table - $this->_addSql("DELETE FROM cc_schedule WHERE cc_schedule.id IN( - SELECT cc_schedule.id - FROM cc_schedule - LEFT JOIN cc_files - ON cc_schedule.file_id = cc_files.id - WHERE cc_files.id IS NULL)"); - - /* 3) create a foreign key relationship from cc_schedule to cc_files */ - $cc_schedule = $schema->getTable('cc_schedule'); - $cc_schedule->addNamedForeignKeyConstraint('cc_files_folder_fkey', $cc_files, array('file_id'), array('id'), array('onDelete' => 'CASCADE')); - } - - public function down(Schema $schema) - { - - } -} diff --git a/install_minimal/DoctrineMigrations/Version20110713161043.php b/install_minimal/DoctrineMigrations/Version20110713161043.php deleted file mode 100644 index db44a0270..000000000 --- a/install_minimal/DoctrineMigrations/Version20110713161043.php +++ /dev/null @@ -1,26 +0,0 @@ -createTable('cc_country'); - - $cc_country->addColumn('isocode', 'string', array('length' => 3)); - $cc_country->addColumn('name', 'string', array('length' => 255)); - - $cc_country->setPrimaryKey(array('isocode')); - //end create cc_country table - } - - public function down(Schema $schema) - { - $schema->dropTable('cc_country'); - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20110829143306.php b/install_minimal/DoctrineMigrations/Version20110829143306.php deleted file mode 100644 index 477df6a39..000000000 --- a/install_minimal/DoctrineMigrations/Version20110829143306.php +++ /dev/null @@ -1,27 +0,0 @@ -createTable('cc_stream_setting'); - - $cc_stream_setting->addColumn('keyname', 'string', array('length' => 64)); - $cc_stream_setting->addColumn('value', 'string', array('length' => 255)); - $cc_stream_setting->addColumn('type', 'string', array('length' => 16)); - - $cc_stream_setting->setPrimaryKey(array('keyname')); - //end create cc_stream_setting table - } - - public function down(Schema $schema) - { - $schema->dropTable('cc_stream_setting'); - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20110922153933.php b/install_minimal/DoctrineMigrations/Version20110922153933.php deleted file mode 100644 index 42e10ad19..000000000 --- a/install_minimal/DoctrineMigrations/Version20110922153933.php +++ /dev/null @@ -1,23 +0,0 @@ -getTable('cc_files'); - $cc_files->addColumn('soundcloud_id', 'integer', array('notnull' => 0, 'default'=> NULL)); - $cc_files->addColumn('soundcloud_error_code', 'integer', array('notnull' => 0, 'default'=> NULL)); - $cc_files->addColumn('soundcloud_error_msg', 'string', array('length' => 255, 'notnull' => 0, 'default'=> NULL)); - } - - public function down(Schema $schema) - { - - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20110925171051.php b/install_minimal/DoctrineMigrations/Version20110925171051.php deleted file mode 100644 index d4aa77cff..000000000 --- a/install_minimal/DoctrineMigrations/Version20110925171051.php +++ /dev/null @@ -1,26 +0,0 @@ -_addSql("update cc_files as cf set soundcloud_id = csi.soundcloud_id - from cc_show_instances as csi - where csi.file_id = cf.id and file_id is not NULL"); - - // remove soundcloud_id from cc_show_instance table - $cc_show_instances = $schema->getTable('cc_show_instances'); - $cc_show_instances->dropColumn('soundcloud_id'); - } - - public function down(Schema $schema) - { - - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20110925171256.php b/install_minimal/DoctrineMigrations/Version20110925171256.php deleted file mode 100644 index b10c0a421..000000000 --- a/install_minimal/DoctrineMigrations/Version20110925171256.php +++ /dev/null @@ -1,29 +0,0 @@ -createTable('cc_login_attempts'); - - $cc_login->addColumn('ip', 'string', array('length' => 32)); - $cc_login->addColumn('attempts', 'integer', array('notnull' => 0, 'default'=> 0)); - - $cc_login->setPrimaryKey(array('ip')); - - // add login_attempts column to cc_subjs table - $cc_subjs = $schema->getTable('cc_subjs'); - $cc_subjs->addColumn('login_attempts', 'integer', array('notnull' => 0, 'default'=> 0)); - } - - public function down(Schema $schema) - { - - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20110929184401.php b/install_minimal/DoctrineMigrations/Version20110929184401.php deleted file mode 100644 index 22828b054..000000000 --- a/install_minimal/DoctrineMigrations/Version20110929184401.php +++ /dev/null @@ -1,23 +0,0 @@ -createTable('cc_service_register'); - $cc_component->addColumn('name', 'string', array('length' => 32)); - $cc_component->addColumn('ip', 'string', array('length' => 18)); - - $cc_component->setPrimaryKey(array('name')); - } - - public function down(Schema $schema) - { - - } -} diff --git a/install_minimal/DoctrineMigrations/Version20111102142811.php b/install_minimal/DoctrineMigrations/Version20111102142811.php deleted file mode 100644 index d0a80da84..000000000 --- a/install_minimal/DoctrineMigrations/Version20111102142811.php +++ /dev/null @@ -1,25 +0,0 @@ - 'soundcloud_auto_upload_recorded_show' CC-2928 - $this->_addSql("UPDATE cc_pref SET keystr = 'soundcloud_auto_upload_recorded_show' - WHERE keystr = 'soundcloud_upload'"); - - // add soundcloud_link_to_file - $cc_files = $schema->getTable('cc_files'); - $cc_files->addColumn('soundcloud_link_to_file', 'string', array('length' => 4096, 'notnull' => 0, 'default'=> NULL)); - } - - public function down(Schema $schema) - { - - } -} \ No newline at end of file diff --git a/install_minimal/DoctrineMigrations/Version20111103141311.php b/install_minimal/DoctrineMigrations/Version20111103141311.php deleted file mode 100644 index 9be485e29..000000000 --- a/install_minimal/DoctrineMigrations/Version20111103141311.php +++ /dev/null @@ -1,21 +0,0 @@ -getTable('cc_show_days'); - $cc_subjs->addColumn('timezone', 'string', array('required' => true, 'default'=> '')); - } - - public function down(Schema $schema) - { - - } -} diff --git a/install_minimal/DoctrineMigrations/Version20111114222927.php b/install_minimal/DoctrineMigrations/Version20111114222927.php deleted file mode 100644 index b0cf33379..000000000 --- a/install_minimal/DoctrineMigrations/Version20111114222927.php +++ /dev/null @@ -1,20 +0,0 @@ -getTable('cc_show_instances'); - $cc_show_instances->addColumn('modified_instance', 'boolean', array('notnull' => true, 'default'=> '0')); - } - - public function down(Schema $schema) - { - - } -} diff --git a/install_minimal/DoctrineMigrations/Version20120613123039.php b/install_minimal/DoctrineMigrations/Version20120613123039.php deleted file mode 100644 index 74145ade7..000000000 --- a/install_minimal/DoctrineMigrations/Version20120613123039.php +++ /dev/null @@ -1,20 +0,0 @@ -getTable("cc_subjs"); - $table->addColumn("cell_phone", "string"); - } - - public function down(Schema $schema) - { - - } -} diff --git a/install_minimal/DoctrineMigrations/migrations.xml b/install_minimal/DoctrineMigrations/migrations.xml deleted file mode 100644 index c78b0c499..000000000 --- a/install_minimal/DoctrineMigrations/migrations.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Airtime 2.0.0 Database Upgrade - - DoctrineMigrations - - - - ./ - - diff --git a/install_minimal/airtime-dircheck.php b/install_minimal/airtime-dircheck.php deleted file mode 100644 index d689af689..000000000 --- a/install_minimal/airtime-dircheck.php +++ /dev/null @@ -1,5 +0,0 @@ -&2; exit 1;; - (*) break;; - esac - shift -done - -if [ "$mediamonitor" = "f" -a "$pypo" = "f" -a "$web" = "f" ]; then - #none of these install parameters were specified, so by default we install all of them - mediamonitor="t" - pypo="t" - showrecorder="t" - web="t" -fi - -if [ "$disable_deb_check" == "f" ]; then - set +e - DEB=$(dpkg -s airtime 2> /dev/null | grep Status) - set -e - if [[ "$DEB" = "Status: install ok installed" ]]; then - echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n" - exit 1 - fi -fi - - -#Update apt sources.list to point to the new deb-multimedia domain. -sed -i s/www.debian-multimedia.org/www.deb-multimedia.org/g /etc/apt/sources.list - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` -AIRTIMEROOT=$SCRIPTPATH/../ - -echo "* Making sure /etc/default/locale is set properly" -set +e -update-locale -cat /etc/default/locale | grep -i "LANG=.*UTF-\?8" -if [ "$?" != "0" ]; then - echo -e " * Fail\n" - echo "A non UTF-8 default locale found in /etc/default/locale. Airtime requires -a UTF-8 locale to run. To fix this please do the following: - -Ubuntu: -Put line 'en_US.UTF-8 UTF-8' (or similar) without quotes to '/var/lib/locales/supported.d/local', -replacing any existing lines. -A list of supported locales is available in '/usr/share/i18n/SUPPORTED' -Then run 'sudo dpkg-reconfigure locales' - -Debian: -Run 'sudo dpkg-reconfigure locales' and use the interface to select 'en_US.UTF-8 UTF-8' (or similar). -On the second page select this new locale as the default. - -After these changes have been made simply run install again. - -Now exiting install... -" - exit 1 -fi -set -e - -# Check if airtime exists already -set +e -php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-installed-check.php -result=$? -set -e - -DO_UPGRADE="0" -if [ "$result" -eq "0" ]; then - echo " * None found." - - #Make sure any straggler config files are removed. Reason for this is that they may be from - #an older version of Airtime, but since there no database installed, we have no idea how to - #handle these (what version are they from?). - rm -f "/etc/airtime/airtime.conf" - rm -f "/etc/airtime/api_client.cfg" - rm -f "/etc/airtime/liquidsoap.cfg" - rm -f "/etc/airtime/media-monitor.cfg" - rm -f "/etc/airtime/pypo.cfg" -elif [ "$result" -eq "1" -a "$reinstall" = "f" ]; then - echo " * Same version of Airtime already installed! Reusing database." - nodb='t' - overwrite='f' -elif [ "$result" -eq "2" ]; then - echo " * Previous version of Airtime already installed..will perform upgrade." - DO_UPGRADE="1" -elif [ "$result" -eq "3" ]; then - echo " * You require at least Airtime 1.8.0 installed for upgrade." - exit 1 -fi - -#We don't want any of our python services running if we are doing an upgrade/reinstall. -#They will be automatically restarted later on. -echo "* Temporarily stopping any previous running services" -set +e -monit unmonitor airtime-media-monitor >/dev/null 2>&1 -monit unmonitor airtime-liquidsoap >/dev/null 2>&1 -monit unmonitor airtime-playout >/dev/null 2>&1 -set -e -if [ -e /etc/init.d/airtime-media-monitor ]; then - invoke-rc.d airtime-media-monitor stop > /dev/null 2>&1 -fi -if [ -e /etc/init.d/airtime-playout ]; then - invoke-rc.d airtime-playout stop > /dev/null 2>&1 -fi -if [ -e /etc/init.d/airtime-liquidsoap ]; then - invoke-rc.d airtime-liquidsoap stop > /dev/null 2>&1 -fi - -#export these variables to make them available in sub bash scripts -export DO_UPGRADE -export mediamonitor -export pypo -export showrecorder -export web -export reinstall -export nodb -export overwrite -export preserve - -set +e -test "$mediamonitor" = "t" -o "$pypo" = "t" -export python_service=$? -set -e - -echo -e "\n******************************** Install Begin *********************************" -rm -rf "/usr/lib/airtime" -mkdir -p /usr/lib/airtime - -if [ "$python_service" -eq "0" ]; then - $AIRTIMEROOT/python_apps/python-virtualenv/virtualenv-install.sh - - virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" - . ${virtualenv_bin}activate - python $AIRTIMEROOT/python_apps/create-pypo-user.py -fi - -if [ "$DO_UPGRADE" -eq "1" ]; then - #do upgrade - php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-upgrade.php $@ -fi - -set +e -if [ "$DO_UPGRADE" -eq "0" ]; then - php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-install.php $@ - result=$? - - if [ "$result" -ne "0" ]; then - #There was an error, exit with error code. - echo "There was an error during install. Exit code $result" - exit 1 - fi -fi - -rabbitmq_install -set -e - - -export airtime_service_start='t' -$SCRIPTPATH/include/airtime-copy-files.sh -$SCRIPTPATH/include/airtime-initialize.sh $@ - -if [ "$mediamonitor" = "t" -o "$pypo" = "t" ]; then - #deactivate virtualenv - deactivate -fi - - -#An attempt to force apache to realize that files are updated on upgrade... -touch /usr/share/airtime/public/index.php - -if [ "$python_service" -eq "0" ]; then - #only run airtime-check-system if all components were installed - echo -e "\n*** Verifying your system environment, running airtime-check-system ***" - sleep 10 - - set +e - airtime-check-system --no-color - set -e -fi - -echo -e "\n******************************* Install Complete *******************************" diff --git a/install_minimal/airtime-php.ini b/install_minimal/airtime-php.ini deleted file mode 100644 index 3a12449ab..000000000 --- a/install_minimal/airtime-php.ini +++ /dev/null @@ -1,1854 +0,0 @@ -[PHP] -suhosin.executor.include.whitelist="phar" - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (C:\windows or C:\winnt) -; See the PHP docs for more specific information. -; http://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and Lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; http://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it's -; much more verbose when it comes to errors. We recommending using the -; development version only in development environments as errors shown to -; application users can inadvertently leak otherwise secure information. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; allow_call_time_pass_reference -; Default Value: On -; Development Value: Off -; Production Value: Off - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL & ~E_NOTICE -; Development Value: E_ALL | E_STRICT -; Production Value: E_ALL & ~E_DEPRECATED - -; html_errors -; Default Value: On -; Development Value: On -; Production value: Off - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; magic_quotes_gpc -; Default Value: On -; Development Value: Off -; Production Value: Off - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; register_long_arrays -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.bug_compat_42 -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.bug_compat_warn -; Default Value: On -; Development Value: On -; Production Value: Off - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.hash_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; track_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; url_rewriter.tags -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It's been -; recommended for several years that you not use the short tag "short cut" and -; instead to use the full tag combination. With the wide spread use -; of XML and use of these tags by other languages, the server can become easily -; confused and end up parsing the wrong code in the wrong context. But because -; this short cut has been a feature for such a long time, it's currently still -; supported for backwards compatibility, but we recommend you don't use them. -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/short-open-tag -short_open_tag = On - -; Allow ASP-style <% %> tags. -; http://php.net/asp-tags -asp_tags = Off - -; The number of significant digits displayed in floating point numbers. -; http://php.net/precision -precision = 14 - -; Enforce year 2000 compliance (will cause problems with non-compliant browsers) -; http://php.net/y2k-compliance -y2k_compliance = On - -; Output buffering is a mechanism for controlling how much output data -; (excluding headers and cookies) PHP should keep internally before pushing that -; data to the client. If your application's output exceeds this setting, PHP -; will send that data in chunks of roughly the size you specify. -; Turning on this setting and managing its maximum buffer size can yield some -; interesting side-effects depending on your application and web server. -; You may be able to send headers and cookies after you've already sent output -; through print or echo. You also may see performance benefits if your server is -; emitting less packets due to buffered output versus PHP streaming the output -; as it gets it. On production servers, 4096 bytes is a good setting for performance -; reasons. -; Note: Output buffering can also be controlled via Output Buffering Control -; functions. -; Possible Values: -; On = Enabled and buffer is unlimited. (Use with caution) -; Off = Disabled -; Integer = Enables the buffer and sets its maximum size in bytes. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 -; http://php.net/output-buffering -output_buffering = 4096 - -; You can redirect all of the output of your scripts to a function. For -; example, if you set output_handler to "mb_output_handler", character -; encoding will be transparently converted to the specified encoding. -; Setting any output handler automatically turns on output buffering. -; Note: People who wrote portable scripts should not depend on this ini -; directive. Instead, explicitly set the output handler using ob_start(). -; Using this ini directive may cause problems unless you know what script -; is doing. -; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" -; and you cannot use both "ob_gzhandler" and "zlib.output_compression". -; Note: output_handler must be empty if this is set 'On' !!!! -; Instead you must use zlib.output_handler. -; http://php.net/output-handler -;output_handler = - -; Transparent output compression using the zlib library -; Valid values for this option are 'off', 'on', or a specific buffer size -; to be used for compression (default is 4KB) -; Note: Resulting chunk size may vary due to nature of compression. PHP -; outputs chunks that are few hundreds bytes each as a result of -; compression. If you prefer a larger chunk size for better -; performance, enable output_buffering in addition. -; Note: You need to use zlib.output_handler instead of the standard -; output_handler, or otherwise the output will be corrupted. -; http://php.net/zlib.output-compression -zlib.output_compression = Off - -; http://php.net/zlib.output-compression-level -;zlib.output_compression_level = -1 - -; You cannot specify additional output handlers if zlib.output_compression -; is activated here. This setting does the same as output_handler but in -; a different order. -; http://php.net/zlib.output-handler -;zlib.output_handler = - -; Implicit flush tells PHP to tell the output layer to flush itself -; automatically after every output block. This is equivalent to calling the -; PHP function flush() after each and every call to print() or echo() and each -; and every HTML block. Turning this option on has serious performance -; implications and is generally recommended for debugging purposes only. -; http://php.net/implicit-flush -; Note: This directive is hardcoded to On for the CLI SAPI -implicit_flush = Off - -; The unserialize callback function will be called (with the undefined class' -; name as parameter), if the unserializer finds an undefined class -; which should be instantiated. A warning appears if the specified function is -; not defined, or if the function doesn't include/implement the missing class. -; So only set this entry, if you really want to implement such a -; callback-function. -unserialize_callback_func = - -; When floats & doubles are serialized store serialize_precision significant -; digits after the floating point. The default value ensures that when floats -; are decoded with unserialize, the data will remain the same. -serialize_precision = 100 - -; This directive allows you to enable and disable warnings which PHP will issue -; if you pass a value by reference at function call time. Passing values by -; reference at function call time is a deprecated feature which will be removed -; from PHP at some point in the near future. The acceptable method for passing a -; value by reference to a function is by declaring the reference in the functions -; definition, not at call time. This directive does not disable this feature, it -; only determines whether PHP will warn you about it or not. These warnings -; should enabled in development environments only. -; Default Value: On (Suppress warnings) -; Development Value: Off (Issue warnings) -; Production Value: Off (Issue warnings) -; http://php.net/allow-call-time-pass-reference -allow_call_time_pass_reference = Off - -; Safe Mode -; http://php.net/safe-mode -safe_mode = Off - -; By default, Safe Mode does a UID compare check when -; opening files. If you want to relax this to a GID compare, -; then turn on safe_mode_gid. -; http://php.net/safe-mode-gid -safe_mode_gid = Off - -; When safe_mode is on, UID/GID checks are bypassed when -; including files from this directory and its subdirectories. -; (directory must also be in include_path or full path must -; be used when including) -; http://php.net/safe-mode-include-dir -safe_mode_include_dir = - -; When safe_mode is on, only executables located in the safe_mode_exec_dir -; will be allowed to be executed via the exec family of functions. -; http://php.net/safe-mode-exec-dir -safe_mode_exec_dir = - -; Setting certain environment variables may be a potential security breach. -; This directive contains a comma-delimited list of prefixes. In Safe Mode, -; the user may only alter environment variables whose names begin with the -; prefixes supplied here. By default, users will only be able to set -; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). -; Note: If this directive is empty, PHP will let the user modify ANY -; environment variable! -; http://php.net/safe-mode-allowed-env-vars -safe_mode_allowed_env_vars = PHP_ - -; This directive contains a comma-delimited list of environment variables that -; the end user won't be able to change using putenv(). These variables will be -; protected even if safe_mode_allowed_env_vars is set to allow to change them. -; http://php.net/safe-mode-protected-env-vars -safe_mode_protected_env_vars = LD_LIBRARY_PATH - -; open_basedir, if set, limits all file operations to the defined directory -; and below. This directive makes most sense if used in a per-directory -; or per-virtualhost web server configuration file. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/open-basedir -;open_basedir = - -; This directive allows you to disable certain functions for security reasons. -; It receives a comma-delimited list of function names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-functions -disable_functions = - -; This directive allows you to disable certain classes for security reasons. -; It receives a comma-delimited list of class names. This directive is -; *NOT* affected by whether Safe Mode is turned On or Off. -; http://php.net/disable-classes -disable_classes = - -; Colors for Syntax Highlighting mode. Anything that's acceptable in -; would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.bg = #FFFFFF -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; http://php.net/realpath-cache-size -;realpath_cache_size = 16k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = On - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 60 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = -1 - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL | E_STRICT. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.) -; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.) -; Default Value: E_ALL & ~E_NOTICE -; Development Value: E_ALL | E_STRICT -; Production Value: E_ALL & ~E_DEPRECATED -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; It's recommended that errors be logged on production servers rather than -; having the errors sent to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. But, it's strongly recommended that you -; leave this setting off on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/track-errors -track_errors = Off - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of inserting html -; links to documentation related to that error. This directive controls whether -; those HTML links appear in error messages or not. For performance and security -; reasons, it's recommended you disable this on production servers. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: Off -; http://php.net/html-errors -html_errors = Off - -; If html_errors is set On PHP produces clickable error messages that direct -; to a page describing the error or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on NT, not valid in Windows 95). -;error_log = syslog - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. If the register_globals directive is enabled, it also determines -; what order variables are populated into the global space. G,P,C,E & S are -; abbreviations for the following respective super globals: GET, POST, COOKIE, -; ENV and SERVER. There is a performance penalty paid for the registration of -; these arrays and because ENV is not as commonly used as the others, ENV is -; is not recommended on productions servers. You can still get access to -; the environment variables through getenv() should you need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P,C,E & S) should -; be registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive are -; specified in the same manner as the variables_order directive, EXCEPT one. -; Leaving this value empty will cause PHP to use the value set in the -; variables_order directive. It does not mean it will leave the super globals -; array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; Whether or not to register the EGPCS variables as global variables. You may -; want to turn this off if you don't want to clutter your scripts' global scope -; with user data. -; You should do your best to write your scripts so that they do not require -; register_globals to be on; Using form variables as globals can easily lead -; to possible security problems, if the code is not very well thought of. -; http://php.net/register-globals -register_globals = Off - -; Determines whether the deprecated long $HTTP_*_VARS type predefined variables -; are registered by PHP or not. As they are deprecated, we obviously don't -; recommend you use them. They are on by default for compatibility reasons but -; they are not recommended on production servers. -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-long-arrays -register_long_arrays = Off - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the SERVER and ENV variables are created when they're first -; used (Just In Time) instead of when the script starts. If these variables -; are not used within a script, having this directive on will result in a -; performance gain. The PHP directives register_globals, register_long_arrays, -; and register_argc_argv must be disabled for this directive to have any affect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Maximum size of POST data that PHP will accept. -; http://php.net/post-max-size -post_max_size = 8M - -; Magic quotes are a preprocessing feature of PHP where PHP will attempt to -; escape any character sequences in GET, POST, COOKIE and ENV data which might -; otherwise corrupt data being placed in resources such as databases before -; making that data available to you. Because of character encoding issues and -; non-standard SQL implementations across many databases, it's not currently -; possible for this feature to be 100% accurate. PHP's default behavior is to -; enable the feature. We strongly recommend you use the escaping mechanisms -; designed specifically for the database your using instead of relying on this -; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is -; scheduled for removal in PHP 6. -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/magic-quotes-gpc -magic_quotes_gpc = Off - -; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. -; http://php.net/magic-quotes-runtime -magic_quotes_runtime = Off - -; Use Sybase-style magic quotes (escape ' with '' instead of \'). -; http://php.net/magic-quotes-sybase -magic_quotes_sybase = Off - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a character encoding using -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to empty. -; http://php.net/default-charset -;default_charset = "iso-8859-1" - -; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is -; to disable this feature. -; http://php.net/always-populate-raw-post-data -;always_populate_raw_post_data = On - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/usr/share/php" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -; extension_dir = "./" -; On windows: -; extension_dir = "ext" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = ; - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1; - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If it's set 0 PHP sends Status: header that -; is supported by Apache. When this option is set to 1 PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; ... or with a path: -; -; extension=/path/to/extension/msql.so -; -; If you only provide the name of the extension, PHP will look for it in its -; default extension directory. -; - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -;date.timezone = - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -;iconv.input_encoding = ISO-8859-1 -;iconv.internal_encoding = ISO-8859-1 -;iconv.output_encoding = ISO-8859-1 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING - -[sqlite] -; http://php.net/sqlite.assoc-case -;sqlite.assoc_case = 0 - -[sqlite3] -;sqlite3.extension_dir = - -[Pcre] -;PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -;PCRE library recursion limit. -;Please note that if you set this value to a high number you may consume all -;the available process stack and eventually crash PHP (due to reaching the -;stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/pdo_mysql.cache_size -pdo_mysql.cache_size = 2000 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/pdo_mysql.default-socket -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -phar.readonly = Off - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[Syslog] -; Whether or not to define the various syslog variables (e.g. $LOG_PID, -; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In -; runtime, you can define these variables by calling define_syslog_variables(). -; http://php.net/define-syslog-variables -define_syslog_variables = Off - -[mail function] -; For Win32 only. -; http://php.net/smtp -SMTP = localhost -; http://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; http://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(), even in safe mode. -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = On - -; Log all mail() calls including the full path of the script, line #, to address and headers -;mail.log = - -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -;birdstep.max_links = -1 - -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - -[MySQL] -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysql.allow_local_infile -mysql.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysql.allow-persistent -mysql.allow_persistent = On - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysql.cache_size -mysql.cache_size = 2000 - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysql.max-persistent -mysql.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/mysql.max-links -mysql.max_links = -1 - -; Default port number for mysql_connect(). If unset, mysql_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysql.default-port -mysql.default_port = - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysql.default-socket -mysql.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-host -mysql.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysql.default-user -mysql.default_user = - -; Default password for mysql_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysql.default-password -mysql.default_password = - -; Maximum time (in seconds) for connect timeout. -1 means no limit -; http://php.net/mysql.connect-timeout -mysql.connect_timeout = 60 - -; Trace mode. When trace_mode is active (=On), warnings for table/index scans and -; SQL-Errors will be displayed. -; http://php.net/mysql.trace-mode -mysql.trace_mode = Off - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysqli.cache_size -mysqli.cache_size = 2000 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statstics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statstics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -; http://php.net/mysqlnd.net_cmd_buffer_size -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -; http://php.net/mysqlnd.net_read_buffer_size -;mysqlnd.net_read_buffer_size = 32768 - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; http://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; http://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; http://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; http://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; http://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; http://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; http://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgresSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[Sybase-CT] -; Allow or prevent persistent links. -; http://php.net/sybct.allow-persistent -sybct.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/sybct.max-persistent -sybct.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/sybct.max-links -sybct.max_links = -1 - -; Minimum server message severity to display. -; http://php.net/sybct.min-server-severity -sybct.min_server_severity = 10 - -; Minimum client message severity to display. -; http://php.net/sybct.min-client-severity -sybct.min_client_severity = 10 - -; Set per-context timeout -; http://php.net/sybct.timeout -;sybct.timeout= - -;sybct.packet_size - -; The maximum time in seconds to wait for a connection attempt to succeed before returning failure. -; Default: one minute -;sybct.login_timeout= - -; The name of the host you claim to be connecting from, for display by sp_who. -; Default: none -;sybct.hostname= - -; Allows you to define how often deadlocks are to be retried. -1 means "forever". -; Default: 0 -;sybct.deadlock_retry_count= - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if you -; or your OS have problems with lots of files in one directory, and is -; a more efficient layout for servers that handle lots of sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path -;session.save_path = "/tmp" - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combatting -; session hijacking when not specifying and managing your own session id. It is -; not the end all be all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started -; on every session initialization. The probability is calculated by using -; gc_probability/gc_divisor. Where session.gc_probability is the numerator -; and gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 0 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using the following equation: -; gc_probability/gc_divisor. Where session.gc_probability is the numerator and -; session.gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. Increasing this value to 1000 will give you -; a 0.1% chance the gc will run on any give request. For high volume production servers, -; this is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; cd /path/to/sessions; find -cmin +24 | xargs rm - -; PHP 4.2 and less have an undocumented feature/bug that allows you to -; to initialize a session variable in the global scope, even when register_globals -; is disabled. PHP 4.3 and later will warn you, if this feature is used. -; You can disable the feature and the warning separately. At this time, -; the warning is only displayed, if bug_compat_42 is enabled. This feature -; introduces some serious security problems if not handled correctly. It's -; recommended that you do not use this feature on production servers. But you -; should enable this on development servers and enable the warning as well. If you -; do not enable the feature on development servers, you won't be warned when it's -; used and debugging errors caused by this can be difficult to track down. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-42 -session.bug_compat_42 = Off - -; This setting controls whether or not you are warned by PHP when initializing a -; session value into the global space. session.bug_compat_42 must be enabled before -; these warnings can be issued by PHP. See the directive above for more information. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/session.bug-compat-warn -session.bug_compat_warn = Off - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; How many bytes to read from the file. -; http://php.net/session.entropy-length -session.entropy_length = 0 - -; Specified here to create the session id. -; http://php.net/session.entropy-file -; On systems that don't have /dev/urandom /dev/arandom can be used -; On windows, setting the entropy_length setting will activate the -; Windows random source (using the CryptoAPI) -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publically accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Select a hash function for use in generating session ids. -; Possible Values -; 0 (MD5 128 bits) -; 1 (SHA-1 160 bits) -; This option may also be set to the name of any hash function supported by -; the hash extension. A list of available hashes is returned by the hash_algos() -; function. -; http://php.net/session.hash-function -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.hash_bits_per_character = 5 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; http://php.net/url-rewriter.tags -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" - -[MSSQL] -; Allow or prevent persistent links. -mssql.allow_persistent = On - -; Maximum number of persistent links. -1 means no limit. -mssql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -mssql.max_links = -1 - -; Minimum error severity to display. -mssql.min_error_severity = 10 - -; Minimum message severity to display. -mssql.min_message_severity = 10 - -; Compatibility mode with old versions of PHP 3.0. -mssql.compatability_mode = Off - -; Connect timeout -;mssql.connect_timeout = 5 - -; Query timeout -;mssql.timeout = 60 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textlimit = 4096 - -; Valid range 0 - 2147483647. Default = 4096. -;mssql.textsize = 4096 - -; Limits the number of records in each batch. 0 = all records in one batch. -;mssql.batchsize = 0 - -; Specify how datetime and datetim4 columns are returned -; On => Returns data converted to SQL server settings -; Off => Returns values as YYYY-MM-DD hh:mm:ss -;mssql.datetimeconvert = On - -; Use NT authentication when connecting to the server -mssql.secure_connection = Off - -; Specify max number of processes. -1 = library default -; msdlib defaults to 25 -; FreeTDS defaults to 4096 -;mssql.max_procs = -1 - -; Specify client character set. -; If empty or not set the client charset from freetds.comf is used -; This is only used when compiled with FreeTDS -;mssql.charset = "ISO-8859-1" - -[Assertion] -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Issue a PHP warning for each failed assertion. -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a components typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -[mbstring] -; language for internal character representation. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; internal/script encoding. -; Some encoding cannot work as internal encoding. -; (e.g. SJIS, BIG5, ISO-2022-*) -; http://php.net/mbstring.internal-encoding -;mbstring.internal_encoding = EUC-JP - -; http input encoding. -; http://php.net/mbstring.http-input -;mbstring.http_input = auto - -; http output encoding. mb_output_handler must be -; registered as output buffer to function -; http://php.net/mbstring.http-output -;mbstring.http_output = SJIS - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; auto means -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none; - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -;mbstring.strict_detection = Off - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -; Allows to set script encoding. Only affects if PHP is compiled with --enable-zend-multibyte -; Default: "" -;mbstring.script_encoding= - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 0 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[mcrypt] -; For more information about mcrypt settings see http://php.net/mcrypt-module-open - -; Directory where to load mcrypt algorithms -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.algorithms_dir= - -; Directory where to load mcrypt modes -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.modes_dir= - -[dba] -;dba.default_handler= - -; Local Variables: -; tab-width: 4 -; End: - diff --git a/install_minimal/airtime-uninstall b/install_minimal/airtime-uninstall deleted file mode 100755 index bc12a4403..000000000 --- a/install_minimal/airtime-uninstall +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -#Check if root user -if [[ $EUID -ne 0 ]]; then - echo "Please run as root user." - exit 1 -fi - - -options=$(getopt -o p -l purge -- "$@") -if [ $? -ne 0 ]; then - echo "only -p or --purge parameter allowed" - exit 1 -fi -eval set -- "$options" - -purge='f' - -while true -do - case "$1" in - -p|--purge) purge='t'; shift;; - --) shift 1; break ;; - *) break ;; - esac -done - -#Make 'purge' env variable available to sub bash script -export purge - -rabbitmq_uninstall () { - RABBITMQ_VHOST="/airtime" - RABBITMQ_USER="airtime" - - rabbitmqctl delete_vhost $RABBITMQ_VHOST - rabbitmqctl delete_user $RABBITMQ_USER -} - -echo -e "\n******************************* Uninstall Begin ********************************" - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` - -rabbitmq_uninstall - -virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" -. ${virtualenv_bin}activate - -#Uninitialize Airtime -$SCRIPTPATH/include/airtime-uninitialize.sh - -#Remove Airtime files -$SCRIPTPATH/include/airtime-remove-files.sh - -#Remove pypo user -python $SCRIPTPATH/../python_apps/remove-pypo-user.py - -#deactivate virtualenv -deactivate - -echo -e "\n****************************** Uninstall Complete *******************************\n" -echo "NOTE: To fully remove all Airtime files, you will also have to manually delete" -echo " the directories '/srv/airtime'(default storage location of media files)" -echo -e " and '/etc/airtime'(where the config files are stored).\n" diff --git a/install_minimal/include/AirtimeIni.php b/install_minimal/include/AirtimeIni.php deleted file mode 100644 index 2ca53850f..000000000 --- a/install_minimal/include/AirtimeIni.php +++ /dev/null @@ -1,349 +0,0 @@ -$elem) { - if ($first_line) { - $content .= "[".$key."]\n"; - $first_line = false; - } else { - $content .= "\n[".$key."]\n"; - } - foreach ($elem as $key2=>$elem2) { - if(is_array($elem2)) - { - for($i=0;$i$elem) { - if(is_array($elem)) - { - for($i=0;$iquery($sql)->fetchColumn(0); - } catch (PDOException $e){ - // no pref table therefore Airtime is not installed. - //We only get here if airtime database exists, but the table doesn't - //This state sometimes happens if a previous Airtime uninstall couldn't remove - //the database because it was busy, so it just removed the tables instead. - return null; - } - - //if version is empty string, then version is older than version 1.8.0 - if ($version == '') { - try { - // If this table exists, then it's version 1.7.0 - $sql = "SELECT * FROM cc_show_rebroadcast LIMIT 1"; - $result = $con->query($sql)->fetchColumn(0); - $version = "1.7.0"; - } catch (Exception $e) { - $version = null; - } - } - - return $version; - } - - public static function DbTableExists($p_name) - { - $con = Propel::getConnection(); - try { - $sql = "SELECT * FROM ".$p_name." LIMIT 1"; - $con->query($sql); - } catch (PDOException $e){ - return false; - } - return true; - } - - public static function InstallQuery($sql, $verbose = true) - { - $con = Propel::getConnection(); - try { - $con->exec($sql); - if ($verbose) { - echo "done.\n"; - } - } catch (Exception $e) { - echo "Error!\n".$e->getMessage()."\n"; - echo " SQL statement was:\n"; - echo " ".$sql."\n\n"; - } - } - - public static function DropSequence($p_sequenceName) - { - AirtimeInstall::InstallQuery("DROP SEQUENCE IF EXISTS $p_sequenceName", false); - } - - - /** - * Try to connect to the database. Return true on success, false on failure. - * @param boolean $p_exitOnError - * Exit the program on failure. - * @return boolean - */ - public static function DbConnect($p_exitOnError = true) - { - $CC_CONFIG = Config::getConfig(); - try { - $con = Propel::getConnection(); - } catch (Exception $e) { - echo $e->getMessage().PHP_EOL; - echo "Database connection problem.".PHP_EOL; - echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists". - " with corresponding permissions.".PHP_EOL; - if ($p_exitOnError) { - exit(1); - } - return false; - } - return true; - } - - - /* TODO: This function should be moved to the media-monitor - * install script. */ - public static function InstallStorageDirectory() - { - $CC_CONFIG = Config::getConfig(); - echo "* Storage directory setup".PHP_EOL; - - $ini = parse_ini_file(__DIR__."/airtime-install.ini"); - $stor_dir = $ini["storage_dir"]; - - $dirs = array($stor_dir, $stor_dir."/organize"); - - foreach ($dirs as $dir){ - if (!file_exists($dir)) { - if (mkdir($dir, 02775, true)){ - $rp = realpath($dir); - echo "* Directory $rp created".PHP_EOL; - } else { - echo "* Failed creating {$dir}".PHP_EOL; - exit(1); - } - } - else if (is_writable($dir)) { - $rp = realpath($dir); - echo "* Skipping directory already exists: $rp".PHP_EOL; - } - else { - $rp = realpath($dir); - echo "* Error: Directory already exists, but is not writable: $rp".PHP_EOL; - exit(1); - } - - echo "* Giving Apache permission to access $rp".PHP_EOL; - $success = chown($rp, $CC_CONFIG["webServerUser"]); - $success = chgrp($rp, $CC_CONFIG["webServerUser"]); - $success = chmod($rp, 0775); - } - } - - public static function CreateDatabaseUser() - { - $CC_CONFIG = Config::getConfig(); - - echo " * Creating Airtime database user".PHP_EOL; - - $username = $CC_CONFIG['dsn']['username']; - $password = $CC_CONFIG['dsn']['password']; - $command = "echo \"CREATE USER $username ENCRYPTED PASSWORD '$password' LOGIN CREATEDB NOCREATEUSER;\" | su postgres -c psql 2>/dev/null"; - - @exec($command, $output, $results); - if ($results == 0) { - echo " * Database user '{$CC_CONFIG['dsn']['username']}' created.".PHP_EOL; - } else { - if (count($output) > 0) { - echo " * Could not create user '{$CC_CONFIG['dsn']['username']}': ".PHP_EOL; - echo implode(PHP_EOL, $output); - } - else { - echo " * Database user '{$CC_CONFIG['dsn']['username']}' already exists.".PHP_EOL; - } - } - } - - - public static function CreateDatabase() - { - $CC_CONFIG = Config::getConfig(); - - - $database = $CC_CONFIG['dsn']['database']; - $username = $CC_CONFIG['dsn']['username']; - #$command = "echo \"CREATE DATABASE $database OWNER $username\" | su postgres -c psql 2>/dev/null"; - - echo " * Creating Airtime database: " . $database . PHP_EOL; - - putenv("LC_ALL=en_CA.UTF-8"); //Squash warnings when running unit tests - $command = "su postgres -c \"psql -l | cut -f2 -d' ' | grep -w '{$database}'\";"; - exec($command, $output, $rv); - - if ($rv == 0) { - //database already exists - echo "Database already exists." . PHP_EOL; - return true; - } - - $command = "sudo -i -u postgres psql postgres -c \"CREATE DATABASE ".$database." WITH ENCODING 'UTF8' TEMPLATE template0 OWNER ".$username."\""; - - @exec($command, $output, $results); - if ($results == 0) { - echo " * Database '{$CC_CONFIG['dsn']['database']}' created.".PHP_EOL; - } else { - if (count($output) > 0) { - echo " * Could not create database '{$CC_CONFIG['dsn']['database']}': ".PHP_EOL; - echo implode(PHP_EOL, $output); - } - else { - echo " * Database '{$CC_CONFIG['dsn']['database']}' already exists.".PHP_EOL; - } - } - - $databaseExisted = ($results != 0); - - return $databaseExisted; - } - - public static function InstallPostgresScriptingLanguage() - { - $con = Propel::getConnection(); - - // Install postgres scripting language - $sql = 'SELECT COUNT(*) FROM pg_language WHERE lanname = \'plpgsql\''; - $langIsInstalled = $con->query($sql)->fetchColumn(0); - if ($langIsInstalled == '0') { - echo " * Installing Postgres scripting language".PHP_EOL; - $sql = "CREATE LANGUAGE 'plpgsql'"; - AirtimeInstall::InstallQuery($sql, false); - } else { - echo " * Postgres scripting language already installed".PHP_EOL; - } - } - - public static function CreateDatabaseTables($p_dbuser, $p_dbpasswd, $p_dbname, $p_dbhost) - { - echo " * Creating database tables".PHP_EOL; - - // Put Propel sql files in Database - //$command = AirtimeInstall::CONF_DIR_WWW."/library/propel/generator/bin/propel-gen ".AirtimeInstall::CONF_DIR_WWW."/build/ insert-sql 2>/dev/null"; - - $dir = self::GetAirtimeSrcDir()."/build/sql/"; - $files = array("schema.sql", "sequences.sql", "views.sql", "triggers.sql", "defaultdata.sql"); - - foreach ($files as $f){ - $command = "export PGPASSWORD=$p_dbpasswd && psql --username $p_dbuser --dbname $p_dbname --host $p_dbhost --file $dir$f 2>/dev/null"; - @exec($command, $output, $results); - } - - AirtimeInstall::$databaseTablesCreated = true; - } - - public static function BypassMigrations($dir, $version) - { - $appDir = AirtimeInstall::GetAirtimeSrcDir(); - $command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/../../DoctrineMigrations/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction --add migrations:version $version"; - system($command); - } - - public static function MigrateTablesToVersion($dir, $version) - { - $appDir = AirtimeInstall::GetAirtimeSrcDir(); - $command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/../../DoctrineMigrations/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction migrations:migrate $version"; - system($command); - } - - public static function SetAirtimeVersion($p_version) - { - $con = Propel::getConnection(); - $sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'"; - $con->exec($sql); - - Application_Model_Preference::SetAirtimeVersion($p_version); - } - - public static function SetUniqueId() - { - $uniqueId = md5(uniqid("", true)); - Application_Model_Preference::SetUniqueId($uniqueId); - } - - public static function GetAirtimeVersion() - { - $con = Propel::getConnection(); - $sql = "SELECT valstr FROM cc_pref WHERE keystr = 'system_version' LIMIT 1"; - $version = $con->query($sql)->fetchColumn(0); - return $version; - } - - public static function DeleteFilesRecursive($p_path) - { - $command = "rm -rf \"$p_path\""; - exec($command); - } - - public static function CreateSymlinksToUtils() - { - echo "* Creating /usr/bin symlinks".PHP_EOL; - AirtimeInstall::RemoveSymlinks(); - - echo "* Installing airtime-import".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-import/airtime-import"; - exec("ln -s $dir /usr/bin/airtime-import"); - - echo "* Installing airtime-update-db-settings".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-update-db-settings"; - exec("ln -s $dir /usr/bin/airtime-update-db-settings"); - - echo "* Installing airtime-check-system".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-check-system"; - exec("ln -s $dir /usr/bin/airtime-check-system"); - - echo "* Installing airtime-user".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-user"; - exec("ln -s $dir /usr/bin/airtime-user"); - - echo "* Installing airtime-log".PHP_EOL; - $dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-log"; - exec("ln -s $dir /usr/bin/airtime-log"); - } - - public static function RemoveSymlinks() - { - exec("rm -f /usr/bin/airtime-import"); - 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-log"); - exec("rm -f /usr/bin/airtime-clean-storage"); - } - - public static function InstallPhpCode() - { - $CC_CONFIG = Config::getConfig(); - echo "* Installing PHP code to ".AirtimeInstall::CONF_DIR_WWW.PHP_EOL; - exec("mkdir -p ".AirtimeInstall::CONF_DIR_WWW); - exec("cp -R ".AirtimeInstall::GetAirtimeSrcDir()."/* ".AirtimeInstall::CONF_DIR_WWW); - - } - - public static function UninstallPhpCode() - { - echo "* Removing PHP code from ".AirtimeInstall::CONF_DIR_WWW.PHP_EOL; - exec('rm -rf "'.AirtimeInstall::CONF_DIR_WWW.'"'); - } - - public static function InstallBinaries() - { - echo "* Installing binaries to ".AirtimeInstall::CONF_DIR_BINARIES.PHP_EOL; - exec("mkdir -p ".AirtimeInstall::CONF_DIR_BINARIES); - exec("cp -R ".AirtimeInstall::GetUtilsSrcDir()." ".AirtimeInstall::CONF_DIR_BINARIES); - } - - public static function UninstallBinaries() - { - echo "* Removing Airtime binaries from ".AirtimeInstall::CONF_DIR_BINARIES.PHP_EOL; - exec('rm -rf "'.AirtimeInstall::CONF_DIR_BINARIES.'"'); - } - - public static function DirCheck() - { - echo "Legend: \"+\" means the dir/file exists, \"-\" means that it does not.".PHP_EOL; - $dirs = array(AirtimeInstall::CONF_DIR_BINARIES, - AirtimeInstall::CONF_DIR_WWW, - AirtimeIni::CONF_FILE_AIRTIME, - AirtimeIni::CONF_FILE_LIQUIDSOAP, - AirtimeIni::CONF_FILE_PYPO, - AirtimeIni::CONF_FILE_RECORDER, - "/usr/lib/airtime/pypo", - "/var/log/airtime", - "/var/log/airtime/pypo", - "/var/tmp/airtime/pypo"); - foreach ($dirs as $f) { - if (file_exists($f)) { - echo "+ $f".PHP_EOL; - } else { - echo "- $f".PHP_EOL; - } - } - } - - public static function CreateZendPhpLogFile(){ - $CC_CONFIG = Config::getConfig(); - - $path = AirtimeInstall::CONF_DIR_LOG; - $file = $path.'/zendphp.log'; - if (!file_exists($path)){ - mkdir($path, 0755, true); - } - - touch($file); - chmod($file, 0644); - chown($file, $CC_CONFIG['webServerUser']); - chgrp($file, $CC_CONFIG['webServerUser']); - } - - public static function RemoveLogDirectories(){ - $path = AirtimeInstall::CONF_DIR_LOG; - echo "* Removing logs directory ".$path.PHP_EOL; - - exec("rm -rf \"$path\""); - } - - public static function CreateCronFile(){ - echo "* Creating Cron File".PHP_EOL; - // Create CRON task to run every day. Time of day is initialized to a random time. - $hour = rand(0,23); - $minute = rand(0,59); - - $fp = fopen('/etc/cron.d/airtime-crons','w'); - fwrite($fp, "$minute $hour * * * root /usr/lib/airtime/utils/phone_home_stat\n"); - fclose($fp); - } - - public static function removeVirtualEnvDistributeFile(){ - echo "* Removing distribute-0.6.10.tar.gz".PHP_EOL; - if(file_exists('/usr/share/python-virtualenv/distribute-0.6.10.tar.gz')){ - exec("rm -f /usr/share/python-virtualenv/distribute-0.6.10.tar.gz"); - } - } - - public static function printUsage($opts) - { - $msg = $opts->getUsageMessage(); - echo PHP_EOL."Usage: airtime-install [options]"; - echo substr($msg, strpos($msg, "\n")).PHP_EOL; - } - - public static function getOpts() - { - try { - $autoloader = Zend_Loader_Autoloader::getInstance(); - $opts = new Zend_Console_Getopt( - array( - 'help|h' => 'Displays usage information.', - 'overwrite|o' => 'Overwrite any existing config files.', - 'preserve|p' => 'Keep any existing config files.', - 'no-db|n' => 'Turn off database install.', - 'reinstall|r' => 'Force a fresh install of this Airtime Version', - 'webonly|w' => 'Install only web files' - ) - ); - $opts->parse(); - } catch (Zend_Console_Getopt_Exception $e) { - print $e->getMessage() .PHP_EOL; - AirtimeInstall::printUsage($opts); - return NULL; - } - return $opts; - } - - public static function checkPHPVersion() - { - if (PHP_VERSION_ID < 50300) - { - echo "Error: Airtime requires PHP 5.3 or greater."; - return false; - } - return true; - } -} diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php deleted file mode 100644 index 2a3bf95ee..000000000 --- a/install_minimal/include/airtime-constants.php +++ /dev/null @@ -1,3 +0,0 @@ - /etc/cron.d/airtime-crons - -echo "* Creating /usr/lib/airtime" -if [ "$python_service" -eq "0" ]; then - python $AIRTIMEROOT/python_apps/api_clients/install/api_client_install.py - - if [ "$mediamonitor" = "t" ]; then - python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-copy-files.py - fi - if [ "$pypo" = "t" ]; then - python $AIRTIMEROOT/python_apps/pypo/install/pypo-copy-files.py - fi -fi - -cp -R $AIRTIMEROOT/utils /usr/lib/airtime -cp -R $AIRTIMEROOT/python_apps/std_err_override /usr/lib/airtime - -echo "* Creating symbolic links in /usr/bin" -#create symbolic links -ln -sf /usr/lib/airtime/utils/airtime-import/airtime-import /usr/bin/airtime-import -ln -sf /usr/lib/airtime/utils/airtime-update-db-settings /usr/bin/airtime-update-db-settings -ln -sf /usr/lib/airtime/utils/airtime-check-system /usr/bin/airtime-check-system -ln -sf /usr/lib/airtime/utils/airtime-log /usr/bin/airtime-log -ln -sf /usr/lib/airtime/utils/airtime-test-soundcard /usr/bin/airtime-test-soundcard -ln -sf /usr/lib/airtime/utils/airtime-test-stream /usr/bin/airtime-test-stream -ln -sf /usr/lib/airtime/utils/airtime-silan /usr/bin/airtime-silan - -echo "* Creating /var/log/airtime" -mkdir -p /var/log/airtime -chmod a+x /var/log/airtime -chown www-data:www-data /var/log/airtime/ -chown pypo:pypo /var/log/airtime/pypo -chown pypo:pypo /var/log/airtime/pypo-liquidsoap - - -if [ "$web" = "t" ]; then - echo "* Creating /usr/share/airtime" - rm -rf "/usr/share/airtime" - mkdir -p /usr/share/airtime - cp -R $AIRTIMEROOT/airtime_mvc/* /usr/share/airtime/ - rm -f /etc/logrotate.d/airtime-php - cp $AIRTIMEROOT/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php -fi - -echo "* Creating /var/log/airtime" -mkdir -p /var/log/airtime - -echo "* Creating /var/tmp/airtime" -mkdir -p /var/tmp/airtime - -#Finished copying files diff --git a/install_minimal/include/airtime-db-install.php b/install_minimal/include/airtime-db-install.php deleted file mode 100644 index cc1905758..000000000 --- a/install_minimal/include/airtime-db-install.php +++ /dev/null @@ -1,84 +0,0 @@ -exec($sql); - } catch (Exception $e) { - echo " * Failed inserting {$stor_dir} in cc_music_dirs".PHP_EOL; - echo " * Message {$e->getMessage()}".PHP_EOL; - exit(1); - } -} diff --git a/install_minimal/include/airtime-initialize.sh b/install_minimal/include/airtime-initialize.sh deleted file mode 100755 index 63a7c55a2..000000000 --- a/install_minimal/include/airtime-initialize.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -e -#-e Causes bash script to exit if any of the installers -#return with a non-zero return value. - -if [[ $EUID -ne 0 ]]; then - echo "Please run as root user." - exit 1 -fi - -set +e -dist=`lsb_release -is` -echo "Generating locales" -for i in `ls /usr/share/airtime/locale | grep ".._.."`; do - if [ "$dist" = "Debian" ]; then - grep -qi "^$i" /etc/locale.gen - if [ $? -ne 0 ]; then - echo "$i.UTF-8 UTF-8" >> /etc/locale.gen - fi - else - locale-gen "$i.utf8" - fi -done -set -e - -if [ "$dist" = "Debian" ]; then - /usr/sbin/locale-gen -fi - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=`readlink -f $0` -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` - -AIRTIMEROOT=$SCRIPTPATH/../../ - -if [ "$mediamonitor" = "t" ]; then - python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-initialize.py -fi -if [ "$pypo" = "t" ]; then - python $AIRTIMEROOT/python_apps/pypo/install/pypo-initialize.py -fi - -chmod 600 /etc/monit/conf.d/monit-airtime-generic.cfg -chmod 600 /etc/monit/conf.d/monit-airtime-liquidsoap.cfg -chmod 600 /etc/monit/conf.d/monit-airtime-media-monitor.cfg -chmod 600 /etc/monit/conf.d/monit-airtime-playout.cfg -chmod 600 /etc/monit/conf.d/monit-airtime-liquidsoap.cfg - -# Start monit if it is not running, or restart if it is. -# Need to ensure monit is running before Airtime daemons are run. This is -# so we can ensure they can register with monit to monitor them when they start. -# If monit is already running, this step is still useful as we need monit to -# reload its config files. -invoke-rc.d monit restart - -#give monit some time to boot-up before issuing commands -sleep 1 - -set +e -if [ "$mediamonitor" = "t" ]; then - monit monitor airtime-media-monitor -fi -if [ "$pypo" = "t" ]; then - monit monitor airtime-playout - monit monitor airtime-liquidsoap -fi -set -e diff --git a/install_minimal/include/airtime-install.ini b/install_minimal/include/airtime-install.ini deleted file mode 100644 index 01d938f3a..000000000 --- a/install_minimal/include/airtime-install.ini +++ /dev/null @@ -1 +0,0 @@ -storage_dir = /srv/airtime/stor/ diff --git a/install_minimal/include/airtime-install.php b/install_minimal/include/airtime-install.php deleted file mode 100644 index a59baacd9..000000000 --- a/install_minimal/include/airtime-install.php +++ /dev/null @@ -1,88 +0,0 @@ -/dev/null 2>&1 -monit unmonitor airtime-liquidsoap >/dev/null 2>&1 -monit unmonitor airtime-playout >/dev/null 2>&1 -set -e - -#uninitialize Airtime services -python $AIRTIMEROOT/python_apps/pypo/install/pypo-uninitialize.py -python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-uninitialize.py - -if [ "$purge" = "t" ]; then -#call Airtime uninstall script -php --php-ini ${SCRIPTPATH}/../airtime-php.ini ${SCRIPTPATH}/airtime-uninstall.php -fi diff --git a/install_minimal/include/airtime-uninstall.php b/install_minimal/include/airtime-uninstall.php deleted file mode 100644 index 20d323daf..000000000 --- a/install_minimal/include/airtime-uninstall.php +++ /dev/null @@ -1,107 +0,0 @@ -query($sql)->fetchAll(); - } catch (Exception $e) { - $rows = array(); - } - - foreach ($rows as $row) { - $tablename = $row["tablename"]; - echo " * Removing database table $tablename..."; - - $sql = "DROP TABLE $tablename CASCADE"; - AirtimeInstall::InstallQuery($sql, false); - AirtimeInstall::DropSequence($tablename."_id"); - echo "done.".PHP_EOL; - } - - - echo " * Deleting database sequences...".PHP_EOL; - $sql = "SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';"; - try { - $rows = $con->query($sql)->fetchAll(); - } catch (Exception $e) { - $rows = array(); - } - - foreach ($rows as $row) { - $sequence = $row["relname"]; - echo " * Removing database sequence $sequence..."; - - $sql = "DROP SEQUENCE $sequence CASCADE"; - AirtimeInstall::InstallQuery($sql, false); - echo "done.".PHP_EOL; - } - } -} - -//------------------------------------------------------------------------ -// Delete the user -//------------------------------------------------------------------------ -echo " * Deleting database user '{$CC_CONFIG['dsn']['username']}'...".PHP_EOL; -$command = "echo \"DROP USER IF EXISTS {$CC_CONFIG['dsn']['username']}\" | su postgres -c psql >/dev/null 2>&1"; -@exec($command, $output, $results); -if ($results == 0) { - echo " * User '{$CC_CONFIG['dsn']['username']}' deleted.".PHP_EOL; -} else { - echo " * Nothing to delete.".PHP_EOL; -} - diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php deleted file mode 100644 index a85fbeed0..000000000 --- a/install_minimal/include/airtime-upgrade.php +++ /dev/null @@ -1,105 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.2.0/TODO b/install_minimal/upgrades/airtime-2.2.0/TODO deleted file mode 100644 index 037b6cd5f..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/TODO +++ /dev/null @@ -1,9 +0,0 @@ -need to install the following packages: - -mp3gain -vorbisgain -flac -vorbis-tools - - -calculate Replay Gain dB on upgrade: the default value should be NULL. diff --git a/install_minimal/upgrades/airtime-2.2.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.2.0/airtime-upgrade.php deleted file mode 100644 index 924babbdb..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/airtime-upgrade.php +++ /dev/null @@ -1,11 +0,0 @@ -fetchColumn(); - - date_default_timezone_set($timezone); - } - - public static function connectToDatabase($p_exitOnError = true) - { - try { - $con = Propel::getConnection(); - } catch (Exception $e) { - echo $e->getMessage().PHP_EOL; - echo "Database connection problem.".PHP_EOL; - echo "Check if database exists with corresponding permissions.".PHP_EOL; - if ($p_exitOnError) { - exit(1); - } - return false; - } - return true; - } - - - public static function DbTableExists($p_name) - { - $con = Propel::getConnection(); - try { - $sql = "SELECT * FROM ".$p_name." LIMIT 1"; - $con->query($sql); - } catch (PDOException $e){ - return false; - } - return true; - } - - private static function GetAirtimeSrcDir() - { - return __DIR__."/../../../../airtime_mvc"; - } - - public static function MigrateTablesToVersion($dir, $version) - { - echo "Upgrading database, may take several minutes, please wait".PHP_EOL; - - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction migrations:migrate $version"; - system($command); - } - - public static function BypassMigrations($dir, $version) - { - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction --add migrations:version $version"; - system($command); - } - - public static function upgradeConfigFiles(){ - - $configFiles = array(UpgradeCommon::CONF_FILE_AIRTIME, - UpgradeCommon::CONF_FILE_PYPO, - //this is not necessary because liquidsoap configs - //are automatically generated - //UpgradeCommon::CONF_FILE_LIQUIDSOAP, - UpgradeCommon::CONF_FILE_MEDIAMONITOR, - UpgradeCommon::CONF_FILE_API_CLIENT); - - // Backup the config files - $suffix = date("Ymdhis")."-".UpgradeCommon::VERSION_NUMBER; - foreach ($configFiles as $conf) { - // do not back up monit cfg -- ok?? not being done anyway - if (file_exists($conf)) { - echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; - //copy($conf, $conf.$suffix.".bak"); - exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes - } - } - - self::CreateIniFiles(UpgradeCommon::CONF_BACKUP_SUFFIX); - self::MergeConfigFiles($configFiles, $suffix); - - //HACK: This will fix a last minute bug we discovered with our upgrade scripts. - //Will be fixed properly in 2.3.0 - $old = "list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%'"; - $new = "list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%/all/%%all%%'"; - exec("sed -i \"s#$old#$new#g\" /etc/airtime/api_client.cfg"); - - $old = "update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/schedule_id/%%schedule_id%%'"; - $new = "update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/'"; - exec("sed -i \"s#$old#$new#g\" /etc/airtime/api_client.cfg"); - } - - /** - * This function creates the /etc/airtime configuration folder - * and copies the default config files to it. - */ - public static function CreateIniFiles($suffix) - { - if (!file_exists("/etc/airtime/")){ - if (!mkdir("/etc/airtime/", 0755, true)){ - echo "Could not create /etc/airtime/ directory. Exiting."; - exit(1); - } - } - - $config_copy = array( - "../etc/airtime.conf" => self::CONF_FILE_AIRTIME, - "../etc/pypo.cfg" => self::CONF_FILE_PYPO, - "../etc/media-monitor.cfg" => self::CONF_FILE_MEDIAMONITOR, - "../etc/api_client.cfg" => self::CONF_FILE_API_CLIENT - ); - - echo "Copying configs:\n"; - foreach ($config_copy as $path_part => $destination) { - $full_path = OsPath::normpath(OsPath::join(__DIR__, - "$path_part.$suffix")); - echo "'$full_path' --> '$destination'\n"; - if(!copy($full_path, $destination)) { - echo "Failed on the copying operation above\n"; - exit(1); - } - } - } - - private static function MergeConfigFiles(array $configFiles, $suffix) { - foreach ($configFiles as $conf) { - if (file_exists("$conf$suffix.bak")) { - - if($conf === self::CONF_FILE_AIRTIME) { - // Parse with sections - $newSettings = parse_ini_file($conf, true); - $oldSettings = parse_ini_file("$conf$suffix.bak", true); - } - else { - $newSettings = self::ReadPythonConfig($conf); - $oldSettings = self::ReadPythonConfig("$conf$suffix.bak"); - } - - $settings = array_keys($newSettings); - - foreach($settings as $section) { - if(isset($oldSettings[$section])) { - if(is_array($oldSettings[$section])) { - $sectionKeys = array_keys($newSettings[$section]); - foreach($sectionKeys as $sectionKey) { - - if(isset($oldSettings[$section][$sectionKey])) { - self::UpdateIniValue($conf, $sectionKey, - $oldSettings[$section][$sectionKey]); - } - } - } else { - self::UpdateIniValue($conf, $section, - $oldSettings[$section]); - } - } - } - } - } - } - - private static function ReadPythonConfig($p_filename) - { - $values = array(); - - $fh = fopen($p_filename, 'r'); - - while(!feof($fh)){ - $line = fgets($fh); - if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){ - continue; - }else{ - $info = explode('=', $line, 2); - $values[trim($info[0])] = trim($info[1]); - } - } - - return $values; - } - - /** - * This function updates an INI style config file. - * - * A property and the value the property should be changed to are - * supplied. If the property is not found, then no changes are made. - * - * @param string $p_filename - * The path the to the file. - * @param string $p_property - * The property to look for in order to change its value. - * @param string $p_value - * The value the property should be changed to. - * - */ - private static function UpdateIniValue($p_filename, $p_property, $p_value) - { - $lines = file($p_filename); - $n = count($lines); - foreach ($lines as &$line) { - if ($line[0] != "#"){ - $key_value = explode("=", $line); - $key = trim($key_value[0]); - - if ($key == $p_property){ - $line = "$p_property = $p_value".PHP_EOL; - } - } - } - - $fp=fopen($p_filename, 'w'); - for($i=0; $i<$n; $i++){ - fwrite($fp, $lines[$i]); - } - fclose($fp); - } - - public static function queryDb($p_sql){ - $con = Propel::getConnection(); - - try { - $result = $con->query($p_sql); - } catch (Exception $e) { - echo "Error executing $p_sql. Exiting."; - exit(1); - } - - return $result; - } -} - -class OsPath { - // this function is from http://stackoverflow.com/questions/2670299/is-there-a-php-equivalent-function-to-the-python-os-path-normpath - public static function normpath($path) - { - if (empty($path)) - return '.'; - - if (strpos($path, '/') === 0) - $initial_slashes = true; - else - $initial_slashes = false; - if ( - ($initial_slashes) && - (strpos($path, '//') === 0) && - (strpos($path, '///') === false) - ) - $initial_slashes = 2; - $initial_slashes = (int) $initial_slashes; - - $comps = explode('/', $path); - $new_comps = array(); - foreach ($comps as $comp) - { - if (in_array($comp, array('', '.'))) - continue; - if ( - ($comp != '..') || - (!$initial_slashes && !$new_comps) || - ($new_comps && (end($new_comps) == '..')) - ) - array_push($new_comps, $comp); - elseif ($new_comps) - array_pop($new_comps); - } - $comps = $new_comps; - $path = implode('/', $comps); - if ($initial_slashes) - $path = str_repeat('/', $initial_slashes) . $path; - if ($path) - return $path; - else - return '.'; - } - - /* Similar to the os.path.join python method - * http://stackoverflow.com/a/1782990/276949 */ - public static function join() { - $args = func_get_args(); - $paths = array(); - - foreach($args as $arg) { - $paths = array_merge($paths, (array)$arg); - } - - foreach($paths as &$path) { - $path = trim($path, DIRECTORY_SEPARATOR); - } - - if (substr($args[0], 0, 1) == DIRECTORY_SEPARATOR) { - $paths[0] = DIRECTORY_SEPARATOR . $paths[0]; - } - - return join(DIRECTORY_SEPARATOR, $paths); - } -} diff --git a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql deleted file mode 100644 index 95e621874..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql +++ /dev/null @@ -1,227 +0,0 @@ -DELETE FROM cc_pref WHERE keystr = 'system_version'; -INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.2.0'); - ---DELETE user column order prefs, since the number of columns has increased in 2.2 -DELETE FROM cc_pref where keystr = 'library_datatable'; -DELETE FROM cc_pref where keystr = 'timeline_datatable'; - -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_name', 'Airtime!', 'string'); -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_name', '', 'string'); -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_name', '', 'string'); - -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_channels', 'stereo', 'string'); -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_channels', 'stereo', 'string'); -INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_channels', 'stereo', 'string'); - - -CREATE FUNCTION airtime_to_int(chartoconvert character varying) RETURNS integer - AS - 'SELECT CASE WHEN trim($1) SIMILAR TO ''[0-9]+'' THEN CAST(trim($1) AS integer) ELSE NULL END;' - LANGUAGE SQL - IMMUTABLE - RETURNS NULL ON NULL INPUT; - ---clean up database of scheduled items that weren't properly deleted in 2.1.x ---due to a bug -DELETE -FROM cc_schedule -WHERE id IN - (SELECT s.id - FROM cc_schedule s - LEFT JOIN cc_show_instances si ON s.instance_id = si.id - WHERE si.modified_instance = 't'); - -ALTER TABLE cc_files - DROP CONSTRAINT cc_files_gunid_idx; - -DROP INDEX cc_files_file_exists_idx; - -DROP TABLE cc_access; - -CREATE SEQUENCE cc_block_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_blockcontents_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_blockcriteria_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_webstream_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_webstream_metadata_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE TABLE cc_block ( - id integer DEFAULT nextval('cc_block_id_seq'::regclass) NOT NULL, - name character varying(255) DEFAULT ''::character varying NOT NULL, - mtime timestamp(6) without time zone, - utime timestamp(6) without time zone, - creator_id integer, - description character varying(512), - length interval DEFAULT '00:00:00'::interval, - type character varying(7) DEFAULT 'static'::character varying -); - -CREATE TABLE cc_blockcontents ( - id integer DEFAULT nextval('cc_blockcontents_id_seq'::regclass) NOT NULL, - block_id integer, - file_id integer, - "position" integer, - cliplength interval DEFAULT '00:00:00'::interval, - cuein interval DEFAULT '00:00:00'::interval, - cueout interval DEFAULT '00:00:00'::interval, - fadein time without time zone DEFAULT '00:00:00'::time without time zone, - fadeout time without time zone DEFAULT '00:00:00'::time without time zone -); - -CREATE TABLE cc_blockcriteria ( - id integer DEFAULT nextval('cc_blockcriteria_id_seq'::regclass) NOT NULL, - criteria character varying(32) NOT NULL, - modifier character varying(16) NOT NULL, - "value" character varying(512) NOT NULL, - extra character varying(512), - block_id integer NOT NULL -); - -CREATE TABLE cc_webstream ( - id integer DEFAULT nextval('cc_webstream_id_seq'::regclass) NOT NULL, - name character varying(255) NOT NULL, - description character varying(255) NOT NULL, - url character varying(512) NOT NULL, - length interval DEFAULT '00:00:00'::interval NOT NULL, - creator_id integer NOT NULL, - mtime timestamp(6) without time zone NOT NULL, - utime timestamp(6) without time zone NOT NULL, - lptime timestamp(6) without time zone, - mime character varying(255) -); - -CREATE TABLE cc_webstream_metadata ( - id integer DEFAULT nextval('cc_webstream_metadata_id_seq'::regclass) NOT NULL, - instance_id integer NOT NULL, - start_time timestamp without time zone NOT NULL, - liquidsoap_data character varying(1024) NOT NULL -); - -ALTER TABLE cc_files - DROP COLUMN gunid, - ADD COLUMN replay_gain numeric, - ADD COLUMN owner_id integer, - ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */; - -ALTER TABLE cc_files - ADD CONSTRAINT cc_files_owner_fkey FOREIGN KEY (owner_id) REFERENCES cc_subjs(id); - -ALTER TABLE cc_playlistcontents - ADD COLUMN block_id integer, - ADD COLUMN stream_id integer, - ADD COLUMN type smallint DEFAULT 0 NOT NULL; - -ALTER TABLE cc_schedule - ADD COLUMN stream_id integer; - -CREATE INDEX cc_schedule_instance_id_idx - ON cc_schedule - USING btree - (instance_id); - - -ALTER TABLE cc_subjs - ADD COLUMN cell_phone character varying(255); - -ALTER TABLE cc_block - ADD CONSTRAINT cc_block_pkey PRIMARY KEY (id); - -ALTER TABLE cc_blockcontents - ADD CONSTRAINT cc_blockcontents_pkey PRIMARY KEY (id); - -ALTER TABLE cc_blockcriteria - ADD CONSTRAINT cc_blockcriteria_pkey PRIMARY KEY (id); - -ALTER TABLE cc_webstream - ADD CONSTRAINT cc_webstream_pkey PRIMARY KEY (id); - -ALTER TABLE cc_webstream_metadata - ADD CONSTRAINT cc_webstream_metadata_pkey PRIMARY KEY (id); - -ALTER TABLE cc_block - ADD CONSTRAINT cc_block_createdby_fkey FOREIGN KEY (creator_id) REFERENCES cc_subjs(id); - -ALTER TABLE cc_blockcontents - ADD CONSTRAINT cc_blockcontents_block_id_fkey FOREIGN KEY (block_id) REFERENCES cc_block(id) ON DELETE CASCADE; - -ALTER TABLE cc_blockcontents - ADD CONSTRAINT cc_blockcontents_file_id_fkey FOREIGN KEY (file_id) REFERENCES cc_files(id) ON DELETE CASCADE; - -ALTER TABLE cc_blockcriteria - ADD CONSTRAINT cc_blockcontents_block_id_fkey FOREIGN KEY (block_id) REFERENCES cc_block(id) ON DELETE CASCADE; - -ALTER TABLE cc_playlistcontents - ADD CONSTRAINT cc_playlistcontents_block_id_fkey FOREIGN KEY (block_id) REFERENCES cc_block(id) ON DELETE CASCADE; - -ALTER TABLE cc_schedule - ADD CONSTRAINT cc_show_stream_fkey FOREIGN KEY (stream_id) REFERENCES cc_webstream(id) ON DELETE CASCADE; - -ALTER TABLE cc_webstream_metadata - ADD CONSTRAINT cc_schedule_inst_fkey FOREIGN KEY (instance_id) REFERENCES cc_schedule(id) ON DELETE CASCADE; - - - - -ALTER TABLE cc_playlist - DROP CONSTRAINT cc_playlist_createdby_fkey; - -ALTER SEQUENCE cc_block_id_seq - OWNED BY cc_block.id; - -ALTER SEQUENCE cc_blockcontents_id_seq - OWNED BY cc_blockcontents.id; - -ALTER SEQUENCE cc_blockcriteria_id_seq - OWNED BY cc_blockcriteria.id; - -ALTER SEQUENCE cc_webstream_id_seq - OWNED BY cc_webstream.id; - -ALTER SEQUENCE cc_webstream_metadata_id_seq - OWNED BY cc_webstream_metadata.id; - -ALTER TABLE cc_playlist - ADD CONSTRAINT cc_playlist_createdby_fkey FOREIGN KEY (creator_id) REFERENCES cc_subjs(id) ON DELETE CASCADE; - - - - -DROP FUNCTION airtime_to_int(chartoconvert character varying); - -UPDATE cc_files -SET owner_id=(SELECT id FROM cc_subjs WHERE type='A' LIMIT 1) -WHERE owner_id is NULL; - -UPDATE cc_files -SET mime='audio/ogg' -WHERE mime='audio/vorbis'; - - diff --git a/install_minimal/upgrades/airtime-2.2.0/etc/airtime.conf.220 b/install_minimal/upgrades/airtime-2.2.0/etc/airtime.conf.220 deleted file mode 100644 index 0853cedc9..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/etc/airtime.conf.220 +++ /dev/null @@ -1,31 +0,0 @@ -[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 = x -base_url = localhost -base_port = 80 - -;How many hours ahead of time should Airtime playout engine (PYPO) -;cache scheduled media files. -cache_ahead_hours = 1 - -[monit] -monit_user = guest -monit_password = airtime - -[soundcloud] -connection_retries = 3 -time_between_retries = 60 diff --git a/install_minimal/upgrades/airtime-2.2.0/etc/api_client.cfg.220 b/install_minimal/upgrades/airtime-2.2.0/etc/api_client.cfg.220 deleted file mode 100644 index 06e92edb2..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/etc/api_client.cfg.220 +++ /dev/null @@ -1,121 +0,0 @@ -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%%' - -#URL to register a components IP Address with the central web server -register_component = 'register-component/format/json/api_key/%%api_key%%/component/%%component%%' - -# 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%%' - -# URL to tell Airtime about file system mount change -update_fs_mount = 'update-file-system-mount/format/json/api_key/%%api_key%%' - -# URL to commit multiple updates from media monitor at the same time - -reload_metadata_group = 'reload-metadata-group/format/json/api_key/%%api_key%%' - -# URL to tell Airtime about file system mount change -handle_watched_dir_missing = 'handle-watched-dir-missing/format/json/api_key/%%api_key%%/dir/%%dir%%' - -############################# -## 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%%' - -# URL to commit multiple updates from media monitor at the same time - -#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%%' - -# URL to tell Airtime we want to get stream setting -get_stream_setting = 'get-stream-setting/format/json/api_key/%%api_key%%/' - -#URL to update liquidsoap status -update_liquidsoap_status = 'update-liquidsoap-status/format/json/api_key/%%api_key%%/msg/%%msg%%/stream_id/%%stream_id%%/boot_time/%%boot_time%%' - -#URL to check live stream auth -check_live_stream_auth = 'check-live-stream-auth/format/json/api_key/%%api_key%%/username/%%username%%/password/%%password%%/djtype/%%djtype%%' - -#URL to update source status -update_source_status = 'update-source-status/format/json/api_key/%%api_key%%/sourcename/%%sourcename%%/status/%%status%%' - -get_bootstrap_info = 'get-bootstrap-info/format/json/api_key/%%api_key%%' - -get_files_without_replay_gain = 'get-files-without-replay-gain/api_key/%%api_key%%/dir_id/%%dir_id%%' - -update_replay_gain_value = 'update-replay-gain-value/api_key/%%api_key%%' - -notify_webstream_data = 'notify-webstream-data/api_key/%%api_key%%/media_id/%%media_id%%/format/json' - -notify_liquidsoap_started = 'rabbitmq-do-push/api_key/%%api_key%%/format/json' diff --git a/install_minimal/upgrades/airtime-2.2.0/etc/media-monitor.cfg.220 b/install_minimal/upgrades/airtime-2.2.0/etc/media-monitor.cfg.220 deleted file mode 100644 index b1167f56b..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/etc/media-monitor.cfg.220 +++ /dev/null @@ -1,31 +0,0 @@ -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' -rabbitmq_vhost = '/' - -############################################ -# 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. - -# MM2 only: -touch_interval = 5 -chunking_number = 450 -request_max_wait = 3.0 -rmq_event_wait = 0.1 -logpath = '/var/log/airtime/media-monitor/media-monitor.log' -index_path = '/var/tmp/airtime/media-monitor/last_index' - diff --git a/install_minimal/upgrades/airtime-2.2.0/etc/pypo.cfg.220 b/install_minimal/upgrades/airtime-2.2.0/etc/pypo.cfg.220 deleted file mode 100644 index 9ffc390e4..000000000 --- a/install_minimal/upgrades/airtime-2.2.0/etc/pypo.cfg.220 +++ /dev/null @@ -1,85 +0,0 @@ -############################################ -# 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' -rabbitmq_vhost = '/' - -############################################ -# pypo preferences # -############################################ - -# 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' - -############################################ -# Recorded Audio settings # -############################################ -record_bitrate = 256 -record_samplerate = 44100 -record_channels = 2 -record_sample_size = 16 - -#can be either ogg|mp3, mp3 recording requires installation of the package "lame" -record_file_type = 'ogg' - -# base path to store recordered shows at -base_recorded_files = '/var/tmp/airtime/show-recorder/' diff --git a/install_minimal/upgrades/airtime-2.2.1/DbUpgrade.php b/install_minimal/upgrades/airtime-2.2.1/DbUpgrade.php deleted file mode 100644 index bda71b900..000000000 --- a/install_minimal/upgrades/airtime-2.2.1/DbUpgrade.php +++ /dev/null @@ -1,24 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.2.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.2.1/airtime-upgrade.php deleted file mode 100644 index 042b92d05..000000000 --- a/install_minimal/upgrades/airtime-2.2.1/airtime-upgrade.php +++ /dev/null @@ -1,8 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.3.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.3.0/airtime-upgrade.php deleted file mode 100644 index 924babbdb..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/airtime-upgrade.php +++ /dev/null @@ -1,11 +0,0 @@ -fetchColumn(); - - date_default_timezone_set($timezone); - } - - public static function connectToDatabase($p_exitOnError = true) - { - try { - $con = Propel::getConnection(); - } catch (Exception $e) { - echo $e->getMessage().PHP_EOL; - echo "Database connection problem.".PHP_EOL; - echo "Check if database exists with corresponding permissions.".PHP_EOL; - if ($p_exitOnError) { - exit(1); - } - return false; - } - return true; - } - - - public static function DbTableExists($p_name) - { - $con = Propel::getConnection(); - try { - $sql = "SELECT * FROM ".$p_name." LIMIT 1"; - $con->query($sql); - } catch (PDOException $e){ - return false; - } - return true; - } - - private static function GetAirtimeSrcDir() - { - return __DIR__."/../../../../airtime_mvc"; - } - - public static function MigrateTablesToVersion($dir, $version) - { - echo "Upgrading database, may take several minutes, please wait".PHP_EOL; - - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction migrations:migrate $version"; - system($command); - } - - public static function BypassMigrations($dir, $version) - { - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction --add migrations:version $version"; - system($command); - } - - public static function upgradeConfigFiles(){ - - $configFiles = array(UpgradeCommon::CONF_FILE_AIRTIME, - UpgradeCommon::CONF_FILE_PYPO, - //this is not necessary because liquidsoap configs - //are automatically generated - //UpgradeCommon::CONF_FILE_LIQUIDSOAP, - UpgradeCommon::CONF_FILE_MEDIAMONITOR, - UpgradeCommon::CONF_FILE_API_CLIENT); - - // Backup the config files - $suffix = date("Ymdhis")."-".UpgradeCommon::VERSION_NUMBER; - foreach ($configFiles as $conf) { - // do not back up monit cfg -- ok?? not being done anyway - if (file_exists($conf)) { - echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; - //copy($conf, $conf.$suffix.".bak"); - exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes - } - } - - self::CreateIniFiles(UpgradeCommon::CONF_BACKUP_SUFFIX); - self::MergeConfigFiles($configFiles, $suffix); - - //HACK: This will fix a last minute bug we discovered with our upgrade scripts. - //Will be fixed properly in 2.3.0 - $old = "list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%'"; - $new = "list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%/all/%%all%%'"; - exec("sed -i \"s#$old#$new#g\" /etc/airtime/api_client.cfg"); - - $old = "update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/schedule_id/%%schedule_id%%'"; - $new = "update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/'"; - exec("sed -i \"s#$old#$new#g\" /etc/airtime/api_client.cfg"); - } - - /** - * This function creates the /etc/airtime configuration folder - * and copies the default config files to it. - */ - public static function CreateIniFiles($suffix) - { - if (!file_exists("/etc/airtime/")){ - if (!mkdir("/etc/airtime/", 0755, true)){ - echo "Could not create /etc/airtime/ directory. Exiting."; - exit(1); - } - } - - $config_copy = array( - "../etc/airtime.conf" => self::CONF_FILE_AIRTIME, - "../etc/pypo.cfg" => self::CONF_FILE_PYPO, - "../etc/media-monitor.cfg" => self::CONF_FILE_MEDIAMONITOR, - "../etc/api_client.cfg" => self::CONF_FILE_API_CLIENT - ); - - echo "Copying configs:\n"; - foreach ($config_copy as $path_part => $destination) { - $full_path = OsPath::normpath(OsPath::join(__DIR__, - "$path_part.$suffix")); - echo "'$full_path' --> '$destination'\n"; - if(!copy($full_path, $destination)) { - echo "Failed on the copying operation above\n"; - exit(1); - } - } - } - - private static function MergeConfigFiles(array $configFiles, $suffix) { - foreach ($configFiles as $conf) { - if (file_exists("$conf$suffix.bak")) { - - if($conf === self::CONF_FILE_AIRTIME) { - // Parse with sections - $newSettings = parse_ini_file($conf, true); - $oldSettings = parse_ini_file("$conf$suffix.bak", true); - } - else { - $newSettings = self::ReadPythonConfig($conf); - $oldSettings = self::ReadPythonConfig("$conf$suffix.bak"); - } - - $settings = array_keys($newSettings); - - foreach($settings as $section) { - if(isset($oldSettings[$section])) { - if(is_array($oldSettings[$section])) { - $sectionKeys = array_keys($newSettings[$section]); - foreach($sectionKeys as $sectionKey) { - - if(isset($oldSettings[$section][$sectionKey])) { - self::UpdateIniValue($conf, $sectionKey, - $oldSettings[$section][$sectionKey]); - } - } - } else { - self::UpdateIniValue($conf, $section, - $oldSettings[$section]); - } - } - } - } - } - } - - private static function ReadPythonConfig($p_filename) - { - $values = array(); - - $fh = fopen($p_filename, 'r'); - - while(!feof($fh)){ - $line = fgets($fh); - if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){ - continue; - }else{ - $info = explode('=', $line, 2); - $values[trim($info[0])] = trim($info[1]); - } - } - - return $values; - } - - /** - * This function updates an INI style config file. - * - * A property and the value the property should be changed to are - * supplied. If the property is not found, then no changes are made. - * - * @param string $p_filename - * The path the to the file. - * @param string $p_property - * The property to look for in order to change its value. - * @param string $p_value - * The value the property should be changed to. - * - */ - private static function UpdateIniValue($p_filename, $p_property, $p_value) - { - $lines = file($p_filename); - $n = count($lines); - foreach ($lines as &$line) { - if ($line[0] != "#"){ - $key_value = explode("=", $line); - $key = trim($key_value[0]); - - if ($key == $p_property){ - $line = "$p_property = $p_value".PHP_EOL; - } - } - } - - $fp=fopen($p_filename, 'w'); - for($i=0; $i<$n; $i++){ - fwrite($fp, $lines[$i]); - } - fclose($fp); - } - - public static function queryDb($p_sql){ - $con = Propel::getConnection(); - - try { - $result = $con->query($p_sql); - } catch (Exception $e) { - echo "Error executing $p_sql. Exiting."; - exit(1); - } - - return $result; - } -} - -class OsPath { - // this function is from http://stackoverflow.com/questions/2670299/is-there-a-php-equivalent-function-to-the-python-os-path-normpath - public static function normpath($path) - { - if (empty($path)) - return '.'; - - if (strpos($path, '/') === 0) - $initial_slashes = true; - else - $initial_slashes = false; - if ( - ($initial_slashes) && - (strpos($path, '//') === 0) && - (strpos($path, '///') === false) - ) - $initial_slashes = 2; - $initial_slashes = (int) $initial_slashes; - - $comps = explode('/', $path); - $new_comps = array(); - foreach ($comps as $comp) - { - if (in_array($comp, array('', '.'))) - continue; - if ( - ($comp != '..') || - (!$initial_slashes && !$new_comps) || - ($new_comps && (end($new_comps) == '..')) - ) - array_push($new_comps, $comp); - elseif ($new_comps) - array_pop($new_comps); - } - $comps = $new_comps; - $path = implode('/', $comps); - if ($initial_slashes) - $path = str_repeat('/', $initial_slashes) . $path; - if ($path) - return $path; - else - return '.'; - } - - /* Similar to the os.path.join python method - * http://stackoverflow.com/a/1782990/276949 */ - public static function join() { - $args = func_get_args(); - $paths = array(); - - foreach($args as $arg) { - $paths = array_merge($paths, (array)$arg); - } - - foreach($paths as &$path) { - $path = trim($path, DIRECTORY_SEPARATOR); - } - - if (substr($args[0], 0, 1) == DIRECTORY_SEPARATOR) { - $paths[0] = DIRECTORY_SEPARATOR . $paths[0]; - } - - return join(DIRECTORY_SEPARATOR, $paths); - } -} diff --git a/install_minimal/upgrades/airtime-2.3.0/data/schema.sql b/install_minimal/upgrades/airtime-2.3.0/data/schema.sql deleted file mode 100644 index b742303f0..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/data/schema.sql +++ /dev/null @@ -1,93 +0,0 @@ - -CREATE SEQUENCE cc_listener_count_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_locale_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_mount_name_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE SEQUENCE cc_timestamp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -CREATE TABLE cc_listener_count ( - id integer DEFAULT nextval('cc_listener_count_id_seq'::regclass) NOT NULL, - timestamp_id integer NOT NULL, - mount_name_id integer NOT NULL, - listener_count integer NOT NULL -); - -CREATE TABLE cc_locale ( - id integer DEFAULT nextval('cc_locale_id_seq'::regclass) NOT NULL, - locale_code character varying(16) NOT NULL, - locale_lang character varying(128) NOT NULL -); - -CREATE TABLE cc_mount_name ( - id integer DEFAULT nextval('cc_mount_name_id_seq'::regclass) NOT NULL, - mount_name character varying(255) NOT NULL -); - -CREATE TABLE cc_timestamp ( - id integer DEFAULT nextval('cc_timestamp_id_seq'::regclass) NOT NULL, - "timestamp" timestamp without time zone NOT NULL -); - -ALTER TABLE cc_files - ADD COLUMN cuein interval DEFAULT '00:00:00'::interval, - ADD COLUMN cueout interval DEFAULT '00:00:00'::interval, - ADD COLUMN silan_check boolean DEFAULT false, - ADD COLUMN hidden boolean DEFAULT false; - -ALTER TABLE cc_schedule - ALTER COLUMN cue_in DROP DEFAULT, - ALTER COLUMN cue_in SET NOT NULL, - ALTER COLUMN cue_out DROP DEFAULT, - ALTER COLUMN cue_out SET NOT NULL; - -ALTER SEQUENCE cc_listener_count_id_seq - OWNED BY cc_listener_count.id; - -ALTER SEQUENCE cc_locale_id_seq - OWNED BY cc_locale.id; - -ALTER SEQUENCE cc_mount_name_id_seq - OWNED BY cc_mount_name.id; - -ALTER SEQUENCE cc_timestamp_id_seq - OWNED BY cc_timestamp.id; - -ALTER TABLE cc_listener_count - ADD CONSTRAINT cc_listener_count_pkey PRIMARY KEY (id); - -ALTER TABLE cc_locale - ADD CONSTRAINT cc_locale_pkey PRIMARY KEY (id); - -ALTER TABLE cc_mount_name - ADD CONSTRAINT cc_mount_name_pkey PRIMARY KEY (id); - -ALTER TABLE cc_timestamp - ADD CONSTRAINT cc_timestamp_pkey PRIMARY KEY (id); - -ALTER TABLE cc_listener_count - ADD CONSTRAINT cc_mount_name_inst_fkey FOREIGN KEY (mount_name_id) REFERENCES cc_mount_name(id) ON DELETE CASCADE; - -ALTER TABLE cc_listener_count - ADD CONSTRAINT cc_timestamp_inst_fkey FOREIGN KEY (timestamp_id) REFERENCES cc_timestamp(id) ON DELETE CASCADE; diff --git a/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql deleted file mode 100644 index ef768206e..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql +++ /dev/null @@ -1,47 +0,0 @@ -DELETE FROM cc_pref WHERE keystr = 'system_version'; -INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.3.0'); - -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('off_air_meta', 'Airtime - offline', 'string'); -INSERT INTO cc_pref("keystr", "valstr") VALUES('enable_replay_gain', 1); - -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_user', '', 'string'); -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_pass', '', 'string'); -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s2_admin_user', '', 'string'); -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s2_admin_pass', '', 'string'); -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s3_admin_user', '', 'string'); -INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s3_admin_pass', '', 'string'); - ---Make sure that cc_music_dir has a trailing '/' and cc_files does not have a leading '/' -UPDATE cc_music_dirs SET directory = directory || '/' where id in (select id from cc_music_dirs where substr(directory, length(directory)) != '/'); -UPDATE cc_files SET filepath = substring(filepath from 2) where id in (select id from cc_files where substring(filepath from 1 for 1) = '/'); - -UPDATE cc_files SET cueout = length where cueout = '00:00:00'; - -UPDATE cc_schedule SET cue_out = clip_length WHERE cue_out = '00:00:00'; - -UPDATE cc_schedule SET fade_out = '00:00:59.9' WHERE fade_out > '00:00:59.9'; -UPDATE cc_schedule SET fade_in = '00:00:59.9' WHERE fade_in > '00:00:59.9'; -UPDATE cc_playlistcontents SET fadeout = '00:00:59.9' WHERE fadeout > '00:00:59.9'; -UPDATE cc_playlistcontents SET fadein = '00:00:59.9' WHERE fadein > '00:00:59.9'; -UPDATE cc_blockcontents SET fadeout = '00:00:59.9' WHERE fadeout > '00:00:59.9'; -UPDATE cc_blockcontents SET fadein = '00:00:59.9' WHERE fadein > '00:00:59.9'; - -INSERT INTO cc_pref("keystr", "valstr") VALUES('locale', 'en_CA'); - -INSERT INTO cc_pref("subjid", "keystr", "valstr") VALUES(1, 'user_locale', 'en_CA'); - -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_CA', 'English (Canada)'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_GB', 'English (Britain)'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_US', 'English (USA)'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_AT', 'Österreichisches Deutsch'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ko_KR', '한국어'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('pl_PL', 'Polski'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('pt_BR', 'Português Brasileiro'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('ru_RU', 'Русский'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('zh_CN', '简体中文'); -INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('el_GR', 'Ελληνικά'); diff --git a/install_minimal/upgrades/airtime-2.3.0/etc/airtime.conf.230 b/install_minimal/upgrades/airtime-2.3.0/etc/airtime.conf.230 deleted file mode 100644 index 7495bd9f3..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/etc/airtime.conf.230 +++ /dev/null @@ -1,32 +0,0 @@ -[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 = x -base_url = localhost -base_port = 80 -base_dir = '/' - -;How many hours ahead of time should Airtime playout engine (PYPO) -;cache scheduled media files. -cache_ahead_hours = 1 - -[monit] -monit_user = guest -monit_password = airtime - -[soundcloud] -connection_retries = 3 -time_between_retries = 60 diff --git a/install_minimal/upgrades/airtime-2.3.0/etc/api_client.cfg.230 b/install_minimal/upgrades/airtime-2.3.0/etc/api_client.cfg.230 deleted file mode 100644 index 10d091b77..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/etc/api_client.cfg.230 +++ /dev/null @@ -1,128 +0,0 @@ -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%%' - -#URL to register a components IP Address with the central web server -register_component = 'register-component/format/json/api_key/%%api_key%%/component/%%component%%' - -# Hostname -host = 'localhost' -base_port = 80 -base_dir = '/' - -############################# -## 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%%/all/%%all%%' - -# 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%%' - -# URL to tell Airtime about file system mount change -update_fs_mount = 'update-file-system-mount/format/json/api_key/%%api_key%%' - -# URL to commit multiple updates from media monitor at the same time - -reload_metadata_group = 'reload-metadata-group/format/json/api_key/%%api_key%%' - -# URL to tell Airtime about file system mount change -handle_watched_dir_missing = 'handle-watched-dir-missing/format/json/api_key/%%api_key%%/dir/%%dir%%' - -############################# -## 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%%' - -# URL to commit multiple updates from media monitor at the same time - -#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%%/' - -# URL to tell Airtime we want to get stream setting -get_stream_setting = 'get-stream-setting/format/json/api_key/%%api_key%%/' - -#URL to update liquidsoap status -update_liquidsoap_status = 'update-liquidsoap-status/format/json/api_key/%%api_key%%/msg/%%msg%%/stream_id/%%stream_id%%/boot_time/%%boot_time%%' - -#URL to check live stream auth -check_live_stream_auth = 'check-live-stream-auth/format/json/api_key/%%api_key%%/username/%%username%%/password/%%password%%/djtype/%%djtype%%' - -#URL to update source status -update_source_status = 'update-source-status/format/json/api_key/%%api_key%%/sourcename/%%sourcename%%/status/%%status%%' - -get_bootstrap_info = 'get-bootstrap-info/format/json/api_key/%%api_key%%' - -get_files_without_replay_gain = 'get-files-without-replay-gain/api_key/%%api_key%%/dir_id/%%dir_id%%' - -update_replay_gain_value = 'update-replay-gain-value/api_key/%%api_key%%' - -notify_webstream_data = 'notify-webstream-data/api_key/%%api_key%%/media_id/%%media_id%%/format/json' - -notify_liquidsoap_started = 'rabbitmq-do-push/api_key/%%api_key%%/format/json' - -get_stream_parameters = 'get-stream-parameters/api_key/%%api_key%%/format/json' - -push_stream_stats = 'push-stream-stats/api_key/%%api_key%%/format/json' - -update_stream_setting_table = 'update-stream-setting-table/api_key/%%api_key%%/format/json' diff --git a/install_minimal/upgrades/airtime-2.3.0/etc/media-monitor.cfg.230 b/install_minimal/upgrades/airtime-2.3.0/etc/media-monitor.cfg.230 deleted file mode 100644 index b1167f56b..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/etc/media-monitor.cfg.230 +++ /dev/null @@ -1,31 +0,0 @@ -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' -rabbitmq_vhost = '/' - -############################################ -# 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. - -# MM2 only: -touch_interval = 5 -chunking_number = 450 -request_max_wait = 3.0 -rmq_event_wait = 0.1 -logpath = '/var/log/airtime/media-monitor/media-monitor.log' -index_path = '/var/tmp/airtime/media-monitor/last_index' - diff --git a/install_minimal/upgrades/airtime-2.3.0/etc/pypo.cfg.230 b/install_minimal/upgrades/airtime-2.3.0/etc/pypo.cfg.230 deleted file mode 100644 index 9ffc390e4..000000000 --- a/install_minimal/upgrades/airtime-2.3.0/etc/pypo.cfg.230 +++ /dev/null @@ -1,85 +0,0 @@ -############################################ -# 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' -rabbitmq_vhost = '/' - -############################################ -# pypo preferences # -############################################ - -# 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' - -############################################ -# Recorded Audio settings # -############################################ -record_bitrate = 256 -record_samplerate = 44100 -record_channels = 2 -record_sample_size = 16 - -#can be either ogg|mp3, mp3 recording requires installation of the package "lame" -record_file_type = 'ogg' - -# base path to store recordered shows at -base_recorded_files = '/var/tmp/airtime/show-recorder/' diff --git a/install_minimal/upgrades/airtime-2.3.1/DbUpgrade.php b/install_minimal/upgrades/airtime-2.3.1/DbUpgrade.php deleted file mode 100644 index 363b5776a..000000000 --- a/install_minimal/upgrades/airtime-2.3.1/DbUpgrade.php +++ /dev/null @@ -1,25 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.3.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.3.1/airtime-upgrade.php deleted file mode 100644 index 53470a0df..000000000 --- a/install_minimal/upgrades/airtime-2.3.1/airtime-upgrade.php +++ /dev/null @@ -1,15 +0,0 @@ -fetchColumn(); - - date_default_timezone_set($timezone); - } - - public static function connectToDatabase($p_exitOnError = true) - { - try { - $con = Propel::getConnection(); - } catch (Exception $e) { - echo $e->getMessage().PHP_EOL; - echo "Database connection problem.".PHP_EOL; - echo "Check if database exists with corresponding permissions.".PHP_EOL; - if ($p_exitOnError) { - exit(1); - } - return false; - } - return true; - } - - - public static function DbTableExists($p_name) - { - $con = Propel::getConnection(); - try { - $sql = "SELECT * FROM ".$p_name." LIMIT 1"; - $con->query($sql); - } catch (PDOException $e){ - return false; - } - return true; - } - - private static function GetAirtimeSrcDir() - { - return __DIR__."/../../../../airtime_mvc"; - } - - public static function MigrateTablesToVersion($dir, $version) - { - echo "Upgrading database, may take several minutes, please wait".PHP_EOL; - - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction migrations:migrate $version"; - system($command); - } - - public static function BypassMigrations($dir, $version) - { - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/common/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction --add migrations:version $version"; - system($command); - } - - public static function upgradeConfigFiles(){ - - $configFiles = array(UpgradeCommon::CONF_FILE_AIRTIME, - UpgradeCommon::CONF_FILE_PYPO, - //this is not necessary because liquidsoap configs - //are automatically generated - //UpgradeCommon::CONF_FILE_LIQUIDSOAP, - UpgradeCommon::CONF_FILE_MEDIAMONITOR, - UpgradeCommon::CONF_FILE_API_CLIENT); - - // Backup the config files - $suffix = date("Ymdhis")."-".UpgradeCommon::VERSION_NUMBER; - foreach ($configFiles as $conf) { - // do not back up monit cfg -- ok?? not being done anyway - if (file_exists($conf)) { - echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; - //copy($conf, $conf.$suffix.".bak"); - exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes - } - } - - self::CreateIniFiles(UpgradeCommon::CONF_BACKUP_SUFFIX); - self::MergeConfigFiles($configFiles, $suffix); - } - - /** - * This function creates the /etc/airtime configuration folder - * and copies the default config files to it. - */ - public static function CreateIniFiles($suffix) - { - if (!file_exists("/etc/airtime/")){ - if (!mkdir("/etc/airtime/", 0755, true)){ - echo "Could not create /etc/airtime/ directory. Exiting."; - exit(1); - } - } - - $config_copy = array( - "../etc/airtime.conf" => self::CONF_FILE_AIRTIME, - "../etc/pypo.cfg" => self::CONF_FILE_PYPO, - "../etc/media-monitor.cfg" => self::CONF_FILE_MEDIAMONITOR, - "../etc/api_client.cfg" => self::CONF_FILE_API_CLIENT - ); - - echo "Copying configs:\n"; - foreach ($config_copy as $path_part => $destination) { - $full_path = OsPath::normpath(OsPath::join(__DIR__, - "$path_part.$suffix")); - echo "'$full_path' --> '$destination'\n"; - if(!copy($full_path, $destination)) { - echo "Failed on the copying operation above\n"; - exit(1); - } - } - } - - private static function MergeConfigFiles(array $configFiles, $suffix) { - foreach ($configFiles as $conf) { - if (file_exists("$conf$suffix.bak")) { - - if($conf === self::CONF_FILE_AIRTIME) { - // Parse with sections - $newSettings = parse_ini_file($conf, true); - $oldSettings = parse_ini_file("$conf$suffix.bak", true); - } - else { - $newSettings = self::ReadPythonConfig($conf); - $oldSettings = self::ReadPythonConfig("$conf$suffix.bak"); - } - - $settings = array_keys($newSettings); - - foreach($settings as $section) { - if(isset($oldSettings[$section])) { - if(is_array($oldSettings[$section])) { - $sectionKeys = array_keys($newSettings[$section]); - foreach($sectionKeys as $sectionKey) { - - if(isset($oldSettings[$section][$sectionKey])) { - self::UpdateIniValue($conf, $sectionKey, - $oldSettings[$section][$sectionKey]); - } - } - } else { - self::UpdateIniValue($conf, $section, - $oldSettings[$section]); - } - } - } - } - } - } - - private static function ReadPythonConfig($p_filename) - { - $values = array(); - - $fh = fopen($p_filename, 'r'); - - while(!feof($fh)){ - $line = fgets($fh); - if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){ - continue; - }else{ - $info = explode('=', $line, 2); - $values[trim($info[0])] = trim($info[1]); - } - } - - return $values; - } - - /** - * This function updates an INI style config file. - * - * A property and the value the property should be changed to are - * supplied. If the property is not found, then no changes are made. - * - * @param string $p_filename - * The path the to the file. - * @param string $p_property - * The property to look for in order to change its value. - * @param string $p_value - * The value the property should be changed to. - * - */ - private static function UpdateIniValue($p_filename, $p_property, $p_value) - { - $lines = file($p_filename); - $n = count($lines); - foreach ($lines as &$line) { - if ($line[0] != "#"){ - $key_value = explode("=", $line); - $key = trim($key_value[0]); - - if ($key == $p_property){ - $line = "$p_property = $p_value".PHP_EOL; - } - } - } - - $fp=fopen($p_filename, 'w'); - for($i=0; $i<$n; $i++){ - fwrite($fp, $lines[$i]); - } - fclose($fp); - } - - public static function queryDb($p_sql){ - $con = Propel::getConnection(); - - try { - $result = $con->query($p_sql); - } catch (Exception $e) { - echo "Error executing $p_sql. Exiting."; - exit(1); - } - - return $result; - } -} - -class OsPath { - // this function is from http://stackoverflow.com/questions/2670299/is-there-a-php-equivalent-function-to-the-python-os-path-normpath - public static function normpath($path) - { - if (empty($path)) - return '.'; - - if (strpos($path, '/') === 0) - $initial_slashes = true; - else - $initial_slashes = false; - if ( - ($initial_slashes) && - (strpos($path, '//') === 0) && - (strpos($path, '///') === false) - ) - $initial_slashes = 2; - $initial_slashes = (int) $initial_slashes; - - $comps = explode('/', $path); - $new_comps = array(); - foreach ($comps as $comp) - { - if (in_array($comp, array('', '.'))) - continue; - if ( - ($comp != '..') || - (!$initial_slashes && !$new_comps) || - ($new_comps && (end($new_comps) == '..')) - ) - array_push($new_comps, $comp); - elseif ($new_comps) - array_pop($new_comps); - } - $comps = $new_comps; - $path = implode('/', $comps); - if ($initial_slashes) - $path = str_repeat('/', $initial_slashes) . $path; - if ($path) - return $path; - else - return '.'; - } - - /* Similar to the os.path.join python method - * http://stackoverflow.com/a/1782990/276949 */ - public static function join() { - $args = func_get_args(); - $paths = array(); - - foreach($args as $arg) { - $paths = array_merge($paths, (array)$arg); - } - - foreach($paths as &$path) { - $path = trim($path, DIRECTORY_SEPARATOR); - } - - if (substr($args[0], 0, 1) == DIRECTORY_SEPARATOR) { - $paths[0] = DIRECTORY_SEPARATOR . $paths[0]; - } - - return join(DIRECTORY_SEPARATOR, $paths); - } -} diff --git a/install_minimal/upgrades/airtime-2.3.1/data/upgrade.sql b/install_minimal/upgrades/airtime-2.3.1/data/upgrade.sql deleted file mode 100644 index 6b3bb0a42..000000000 --- a/install_minimal/upgrades/airtime-2.3.1/data/upgrade.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM cc_pref WHERE keystr = 'system_version'; -INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.3.1'); diff --git a/install_minimal/upgrades/airtime-2.4.0/ConfFileUpgrade.php b/install_minimal/upgrades/airtime-2.4.0/ConfFileUpgrade.php deleted file mode 100644 index 4daae0e5a..000000000 --- a/install_minimal/upgrades/airtime-2.4.0/ConfFileUpgrade.php +++ /dev/null @@ -1,28 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.4.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.4.0/airtime-upgrade.php deleted file mode 100644 index 924babbdb..000000000 --- a/install_minimal/upgrades/airtime-2.4.0/airtime-upgrade.php +++ /dev/null @@ -1,11 +0,0 @@ -$elem) { - if ($first_line) { - $content .= "[".$key."]\n"; - $first_line = false; - } else { - $content .= "\n[".$key."]\n"; - } - foreach ($elem as $key2=>$elem2) { - if(is_array($elem2)) - { - for($i=0;$i$elem) { - if(is_array($elem)) - { - for($i=0;$i&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php deleted file mode 100644 index 042b92d05..000000000 --- a/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php +++ /dev/null @@ -1,8 +0,0 @@ -&1 | grep -v \"will create implicit index\""); - passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php deleted file mode 100644 index 042b92d05..000000000 --- a/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php +++ /dev/null @@ -1,8 +0,0 @@ -1 ) -AND ins.id NOT IN (SELECT min(id) FROM cc_show_instances GROUP BY starts,ends,show_id HAVING count(*) >1 ); - - -DELETE FROM cc_schedule -WHERE id -IN (SELECT sc.id FROM cc_schedule AS sc LEFT JOIN cc_show_instances AS i ON sc.instance_id=i.id LEFT JOIN cc_show AS s ON i.show_id=s.id WHERE sc.starts&1 | grep -v \"will create implicit index\""); - } -} diff --git a/install_minimal/upgrades/airtime-2.5.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.5.1/airtime-upgrade.php deleted file mode 100644 index 042b92d05..000000000 --- a/install_minimal/upgrades/airtime-2.5.1/airtime-upgrade.php +++ /dev/null @@ -1,8 +0,0 @@ -getMessage().PHP_EOL; - echo "Database connection problem.".PHP_EOL; - echo "Check if database exists with corresponding permissions.".PHP_EOL; - if ($p_exitOnError) { - exit(1); - } - return false; - } - return true; - } - - - public static function DbTableExists($p_name) - { - $con = Propel::getConnection(); - try { - $sql = "SELECT * FROM ".$p_name." LIMIT 1"; - $con->query($sql); - } catch (PDOException $e){ - return false; - } - return true; - } - - private static function GetAirtimeSrcDir() - { - return __DIR__."/../../../airtime_mvc"; - } - - public static function MigrateTablesToVersion($dir, $version) - { - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/../../DoctrineMigrations/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction migrations:migrate $version"; - system($command); - } - - public static function BypassMigrations($dir, $version) - { - $appDir = self::GetAirtimeSrcDir(); - $command = "php --php-ini $dir/../../airtime-php.ini ". - "$appDir/library/doctrine/migrations/doctrine-migrations.phar ". - "--configuration=$dir/../../DoctrineMigrations/migrations.xml ". - "--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ". - "--no-interaction --add migrations:version $version"; - system($command); - } - - public static function upgradeConfigFiles(){ - - $configFiles = array(UpgradeCommon::CONF_FILE_AIRTIME, - UpgradeCommon::CONF_FILE_PYPO, - UpgradeCommon::CONF_FILE_RECORDER, - UpgradeCommon::CONF_FILE_LIQUIDSOAP, - UpgradeCommon::CONF_FILE_MEDIAMONITOR, - UpgradeCommon::CONF_FILE_API_CLIENT); - - // Backup the config files - $suffix = date("Ymdhis")."-".UpgradeCommon::VERSION_NUMBER; - foreach ($configFiles as $conf) { - // do not back up monit cfg - if (file_exists($conf)) { - echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; - //copy($conf, $conf.$suffix.".bak"); - exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes - } - } - - self::CreateIniFiles(UpgradeCommon::CONF_BACKUP_SUFFIX); - self::MergeConfigFiles($configFiles, $suffix); - } - - /** - * This function creates the /etc/airtime configuration folder - * and copies the default config files to it. - */ - public static function CreateIniFiles($suffix) - { - if (!file_exists("/etc/airtime/")){ - if (!mkdir("/etc/airtime/", 0755, true)){ - echo "Could not create /etc/airtime/ directory. Exiting."; - exit(1); - } - } - - if (!copy(__DIR__."/airtime.conf.$suffix", self::CONF_FILE_AIRTIME)){ - echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; - exit(1); - } - if (!copy(__DIR__."/pypo.cfg.$suffix", self::CONF_FILE_PYPO)){ - echo "Could not copy pypo.cfg to /etc/airtime/. Exiting."; - exit(1); - } - if (!copy(__DIR__."/recorder.cfg.$suffix", self::CONF_FILE_RECORDER)){ - echo "Could not copy recorder.cfg to /etc/airtime/. Exiting."; - exit(1); - } - if (!copy(__DIR__."/api_client.cfg.$suffix", self::CONF_FILE_API_CLIENT)){ - echo "Could not copy airtime-monit.cfg to /etc/monit/conf.d/. Exiting."; - exit(1); - } - } - - private static function MergeConfigFiles($configFiles, $suffix) { - foreach ($configFiles as $conf) { - // we want to use new liquidsoap.cfg so don't merge - // also for monit - if( $conf == self::CONF_FILE_LIQUIDSOAP){ - continue; - } - if (file_exists("$conf$suffix.bak")) { - - if($conf === self::CONF_FILE_AIRTIME) { - // Parse with sections - $newSettings = parse_ini_file($conf, true); - $oldSettings = parse_ini_file("$conf$suffix.bak", true); - } - else { - $newSettings = self::ReadPythonConfig($conf); - $oldSettings = self::ReadPythonConfig("$conf$suffix.bak"); - } - - $settings = array_keys($newSettings); - - foreach($settings as $section) { - if(isset($oldSettings[$section])) { - if(is_array($oldSettings[$section])) { - $sectionKeys = array_keys($newSettings[$section]); - foreach($sectionKeys as $sectionKey) { - // skip airtim_dir as we want to use new value - if($sectionKey != "airtime_dir"){ - if(isset($oldSettings[$section][$sectionKey])) { - self::UpdateIniValue($conf, $sectionKey, $oldSettings[$section][$sectionKey]); - } - } - } - } - else { - self::UpdateIniValue($conf, $section, $oldSettings[$section]); - } - } - } - } - } - } - - private static function ReadPythonConfig($p_filename) - { - $values = array(); - - $fh = fopen($p_filename, 'r'); - - while(!feof($fh)){ - $line = fgets($fh); - if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){ - continue; - }else{ - $info = explode('=', $line, 2); - $values[trim($info[0])] = trim($info[1]); - } - } - - return $values; - } - - /** - * This function updates an INI style config file. - * - * A property and the value the property should be changed to are - * supplied. If the property is not found, then no changes are made. - * - * @param string $p_filename - * The path the to the file. - * @param string $p_property - * The property to look for in order to change its value. - * @param string $p_value - * The value the property should be changed to. - * - */ - private static function UpdateIniValue($p_filename, $p_property, $p_value) - { - $lines = file($p_filename); - $n=count($lines); - foreach ($lines as &$line) { - if ($line[0] != "#"){ - $key_value = explode("=", $line); - $key = trim($key_value[0]); - - if ($key == $p_property){ - $line = "$p_property = $p_value".PHP_EOL; - } - } - } - - $fp=fopen($p_filename, 'w'); - for($i=0; $i<$n; $i++){ - fwrite($fp, $lines[$i]); - } - fclose($fp); - } -} diff --git a/install_minimal/upgrades/upgrade-template/airtime-upgrade.php b/install_minimal/upgrades/upgrade-template/airtime-upgrade.php deleted file mode 100644 index dbe5c7589..000000000 --- a/install_minimal/upgrades/upgrade-template/airtime-upgrade.php +++ /dev/null @@ -1,82 +0,0 @@ - /etc/init.d/airtime-liquidsoap touch /etc/sudoers.d/airtime-liquidsoap_${web_user} -echo "${web_user} ALL = (root) NOPASSWD: /sbin/start airtime-liquidsoap, \ +echo "${web_user} ALL = (root) NOPASSWD: /sbin/start airtime-liquidsoap, \ /sbin/stop airtime-liquidsoap, \ /sbin/restart airtime-liquidsoap, \ /sbin/status airtime-liquidsoap" > /etc/sudoers.d/airtime-liquidsoap_${web_user} @@ -374,8 +374,6 @@ verbose "...Done" chmod 755 /etc/init.d/airtime-* initctl reload-configuration -# Do we need to run the init scripts for media-monitor and pypo here? - if [ ! -d /var/log/airtime ]; then loud "\n-----------------------------------------------------" loud " * Installing Log Files * " diff --git a/python_apps/api_clients/api_client.cfg b/python_apps/api_clients/api_client.cfg deleted file mode 100644 index 5bcce0bfa..000000000 --- a/python_apps/api_clients/api_client.cfg +++ /dev/null @@ -1,12 +0,0 @@ -bin_dir = "/usr/lib/airtime/api_clients" - -# Value needed to access the API -api_key = 'AAA' - -# Path to the base of the API -api_base = 'api' - -# Hostname -host = 'localhost' -base_port = 80 -base_dir = '/' diff --git a/python_apps/api_clients/install/api_client_install.py b/python_apps/api_clients/install/api_client_install.py deleted file mode 100644 index abc1d07de..000000000 --- a/python_apps/api_clients/install/api_client_install.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -import shutil -import sys -from configobj import ConfigObj - -def get_current_script_dir(): - return os.path.dirname(os.path.realpath(__file__)) - -def copy_dir(src_dir, dest_dir): - if (os.path.exists(dest_dir)) and (dest_dir != "/"): - shutil.rmtree(dest_dir) - if not (os.path.exists(dest_dir)): - #print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir) - shutil.copytree(src_dir, dest_dir) - -PATH_INI_FILE = '/etc/airtime/api_client.cfg' - -current_script_dir = get_current_script_dir() - -if not os.path.exists(PATH_INI_FILE): - shutil.copy('%s/../api_client.cfg'%current_script_dir, PATH_INI_FILE) - -"""load config file""" -try: - config = ConfigObj("%s/../api_client.cfg" % current_script_dir) -except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - -#copy python files -copy_dir("%s/../../api_clients"%current_script_dir, config["bin_dir"]) diff --git a/python_apps/api_clients/install/api_client_uninstall.py b/python_apps/api_clients/install/api_client_uninstall.py deleted file mode 100644 index 5ecb2b036..000000000 --- a/python_apps/api_clients/install/api_client_uninstall.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -import sys -from configobj import ConfigObj - -def remove_path(path): - os.system('rm -rf "%s"' % path) - -def get_current_script_dir(): - return os.path.dirname(os.path.realpath(__file__)) - -current_script_dir = get_current_script_dir() - -"""load config file""" -try: - config = ConfigObj("%s/../api_client.cfg" % current_script_dir) -except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - -print " * Removing API Client files" -remove_path(config["bin_dir"]) diff --git a/python_apps/create-pypo-user.py b/python_apps/create-pypo-user.py deleted file mode 100644 index 94e07d7dc..000000000 --- a/python_apps/create-pypo-user.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import sys -from subprocess import Popen, PIPE, STDOUT - -def create_user(username): - print "* Checking for user "+username - - p = Popen('id '+username, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) - output = p.stdout.read() - - if (output[0:3] != "uid"): - # Make the pypo user - print " * Creating user "+username - os.system("adduser --system --quiet --group "+username) - else: - print "User already exists." - #add pypo to audio group - os.system("adduser " + username + " audio 1>/dev/null 2>&1") - #add pypo to www-data group - os.system("adduser " + username + " www-data 1>/dev/null 2>&1") - #add pypo to pulse group - os.system("adduser " + username + " pulse 1>/dev/null 2>&1") - #add pypo to pulse-access group - os.system("adduser " + username + " pulse-access 1>/dev/null 2>&1") - - -if __name__ == "__main__": - if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - - create_user("pypo") diff --git a/python_apps/media-monitor/install/media-monitor-copy-files.py b/python_apps/media-monitor/install/media-monitor-copy-files.py deleted file mode 100644 index 0d149c67e..000000000 --- a/python_apps/media-monitor/install/media-monitor-copy-files.py +++ /dev/null @@ -1,70 +0,0 @@ -import os -import shutil -import sys -import subprocess -import random -import string -from configobj import ConfigObj - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -def get_current_script_dir(): - current_script_dir = os.path.realpath(__file__) - index = current_script_dir.rindex('/') - return current_script_dir[0:index] - -def copy_dir(src_dir, dest_dir): - if (os.path.exists(dest_dir)) and (dest_dir != "/"): - shutil.rmtree(dest_dir) - if not (os.path.exists(dest_dir)): - #print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir) - shutil.copytree(src_dir, dest_dir) - -def create_dir(path): - try: - os.makedirs(path) - # TODO : fix this, at least print the error - except Exception, e: - pass - -def get_rand_string(length=10): - return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(length)) - -PATH_INI_FILE = '/etc/airtime/media-monitor.cfg' - -try: - # Absolute path this script is in - current_script_dir = get_current_script_dir() - - if not os.path.exists(PATH_INI_FILE): - shutil.copy('%s/../media-monitor.cfg'%current_script_dir, PATH_INI_FILE) - - # load config file - try: - config = ConfigObj(PATH_INI_FILE) - except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - - #copy monit files - shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/') - subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True, close_fds=True) - shutil.copy('%s/../monit-airtime-media-monitor.cfg'%current_script_dir, '/etc/monit/conf.d/') - - #create log dir - create_dir(config['log_dir']) - - #copy python files - copy_dir("%s/.."%current_script_dir, config["bin_dir"]) - # mm2 - mm2_source = os.path.realpath(os.path.join(current_script_dir, - "../../media-monitor2")) - copy_dir(mm2_source, os.path.join( config["bin_dir"], "mm2" )) - - #copy init.d script - shutil.copy(config["bin_dir"]+"/airtime-media-monitor-init-d", "/etc/init.d/airtime-media-monitor") - -except Exception, e: - print e diff --git a/python_apps/media-monitor/install/media-monitor-initialize.py b/python_apps/media-monitor/install/media-monitor-initialize.py deleted file mode 100644 index 8cc7b6149..000000000 --- a/python_apps/media-monitor/install/media-monitor-initialize.py +++ /dev/null @@ -1,21 +0,0 @@ -import subprocess -import os - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -try: - #create media-monitor dir under /var/tmp/airtime - if not os.path.exists("/var/tmp/airtime/media-monitor"): - os.makedirs("/var/tmp/airtime/media-monitor") - - #update-rc.d init script - subprocess.call("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True) - - #Start media-monitor daemon - if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t": - print "* Waiting for media-monitor processes to start..." - subprocess.call("invoke-rc.d airtime-media-monitor start", shell=True) -except Exception, e: - print e diff --git a/python_apps/media-monitor/install/media-monitor-remove-files.py b/python_apps/media-monitor/install/media-monitor-remove-files.py deleted file mode 100644 index cf2e2729e..000000000 --- a/python_apps/media-monitor/install/media-monitor-remove-files.py +++ /dev/null @@ -1,44 +0,0 @@ -import os -import shutil -import sys -from configobj import ConfigObj - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -def remove_file(path): - try: - os.remove(path) - except Exception, e: - pass - -PATH_INI_FILE = '/etc/airtime/media-monitor.cfg' - -# load config file -try: - config = ConfigObj(PATH_INI_FILE) -except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - -try: - #remove init.d script - print " * Removing Media-Monitor init.d Script" - remove_file("/etc/init.d/airtime-media-monitor") - - #remove bin dir - print " * Removing Media-Monitor Program Directory" - shutil.rmtree(config['bin_dir'], ignore_errors=True) - - #remove log dir - print " * Removing Media-Monitor Log Directory" - shutil.rmtree(config['log_dir'], ignore_errors=True) - - #remove monit files - print " * Removing Media-Monitor Monit Files" - remove_file("/etc/monit/conf.d/monit-airtime-media-monitor.cfg") - remove_file("/etc/monit/conf.d/monit-airtime-generic.cfg") - -except Exception, e: - print e diff --git a/python_apps/media-monitor/install/media-monitor-uninitialize.py b/python_apps/media-monitor/install/media-monitor-uninitialize.py deleted file mode 100644 index c73801b46..000000000 --- a/python_apps/media-monitor/install/media-monitor-uninitialize.py +++ /dev/null @@ -1,19 +0,0 @@ -import subprocess -import os -import sys - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -try: - print "Waiting for media-monitor processes to stop...", - if (os.path.exists('/etc/init.d/airtime-media-monitor')): - subprocess.call("invoke-rc.d airtime-media-monitor stop", shell=True) - print "OK" - else: - print "Wasn't running" - - subprocess.call("update-rc.d -f airtime-media-monitor remove".split(" ")) -except Exception, e: - print e diff --git a/python_apps/media-monitor/install/media-monitor-uninstall.py b/python_apps/media-monitor/install/media-monitor-uninstall.py deleted file mode 100644 index d2a201316..000000000 --- a/python_apps/media-monitor/install/media-monitor-uninstall.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import sys -from configobj import ConfigObj - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -PATH_INI_FILE = '/etc/airtime/media-monitor.cfg' - -def remove_path(path): - os.system('rm -rf "%s"' % path) - -def get_current_script_dir(): - current_script_dir = os.path.realpath(__file__) - index = current_script_dir.rindex('/') - return current_script_dir[0:index] - -def remove_monit_file(): - os.system("rm -f /etc/monit/conf.d/monit-airtime-media-monitor.cfg") - -try: - # load config file - try: - config = ConfigObj(PATH_INI_FILE) - except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - - os.system("invoke-rc.d airtime-media-monitor stop") - os.system("rm -f /etc/init.d/airtime-media-monitor") - os.system("update-rc.d -f airtime-media-monitor remove >/dev/null 2>&1") - - print "Removing monit file" - remove_monit_file() - - print "Removing log directories" - remove_path(config["log_dir"]) - - print "Removing symlinks" - os.system("rm -f /usr/bin/airtime-media-monitor") - - print "Removing application files" - remove_path(config["bin_dir"]) - - print "Uninstall complete." -except Exception, e: - print "exception:" + str(e) diff --git a/python_apps/media-monitor/monit-airtime-media-monitor.cfg b/python_apps/media-monitor/monit-airtime-media-monitor.cfg deleted file mode 100644 index 51a632f21..000000000 --- a/python_apps/media-monitor/monit-airtime-media-monitor.cfg +++ /dev/null @@ -1,9 +0,0 @@ - set daemon 10 # Poll at 5 second intervals - set logfile /var/log/monit.log - - set httpd port 2812 - - check process airtime-media-monitor - with pidfile "/var/run/airtime/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" diff --git a/python_apps/media-monitor2/configs/airtime.conf b/python_apps/media-monitor2/configs/airtime.conf deleted file mode 100644 index 525aa1ed7..000000000 --- a/python_apps/media-monitor2/configs/airtime.conf +++ /dev/null @@ -1,32 +0,0 @@ -[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 = I6EUOJM0D1EIGSMZ9T70 -web_server_user = www-data -airtime_dir = /usr/share/airtime -base_url = localhost -base_port = 80 -base_dir = '/' - -;How many hours ahead of time should Airtime playout engine (PYPO) -;cache scheduled media files. -cache_ahead_hours = 1 - -[monit] -monit_user = guest -monit_password = airtime - -[soundcloud] -connection_retries = 3 -time_between_retries = 60 diff --git a/python_apps/media-monitor2/configs/api_client.cfg b/python_apps/media-monitor2/configs/api_client.cfg deleted file mode 100644 index f62287e08..000000000 --- a/python_apps/media-monitor2/configs/api_client.cfg +++ /dev/null @@ -1,126 +0,0 @@ -bin_dir = "/usr/lib/airtime/api_clients" - -############################# -## Common -############################# - -# Value needed to access the API -api_key = 'I6EUOJM0D1EIGSMZ9T70' - -# 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%%' - -#URL to register a components IP Address with the central web server -register_component = 'register-component/format/json/api_key/%%api_key%%/component/%%component%%' - -# Hostname -host = 'localhost' -base_port = 80 -base_dir = '/' - -############################# -## 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%%/all/%%all%%' - -# 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%%' - -# URL to tell Airtime about file system mount change -update_fs_mount = 'update-file-system-mount/format/json/api_key/%%api_key%%' - -# URL to commit multiple updates from media monitor at the same time - -reload_metadata_group = 'reload-metadata-group/format/json/api_key/%%api_key%%' - -# URL to tell Airtime about file system mount change -handle_watched_dir_missing = 'handle-watched-dir-missing/format/json/api_key/%%api_key%%/dir/%%dir%%' - -############################# -## 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%%' - -# URL to commit multiple updates from media monitor at the same time - -#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%%/' - -# URL to tell Airtime we want to get stream setting -get_stream_setting = 'get-stream-setting/format/json/api_key/%%api_key%%/' - -#URL to update liquidsoap status -update_liquidsoap_status = 'update-liquidsoap-status/format/json/api_key/%%api_key%%/msg/%%msg%%/stream_id/%%stream_id%%/boot_time/%%boot_time%%' - -#URL to check live stream auth -check_live_stream_auth = 'check-live-stream-auth/format/json/api_key/%%api_key%%/username/%%username%%/password/%%password%%/djtype/%%djtype%%' - -#URL to update source status -update_source_status = 'update-source-status/format/json/api_key/%%api_key%%/sourcename/%%sourcename%%/status/%%status%%' - -get_bootstrap_info = 'get-bootstrap-info/format/json/api_key/%%api_key%%' - -get_files_without_replay_gain = 'get-files-without-replay-gain/api_key/%%api_key%%/dir_id/%%dir_id%%' - -update_replay_gain_value = 'update-replay-gain-value/api_key/%%api_key%%' - -notify_webstream_data = 'notify-webstream-data/api_key/%%api_key%%/media_id/%%media_id%%/format/json' - -notify_liquidsoap_started = 'rabbitmq-do-push/api_key/%%api_key%%/format/json' - -get_stream_parameters = 'get-stream-parameters/api_key/%%api_key%%/format/json' - -push_stream_stats = 'push-stream-stats/api_key/%%api_key%%/format/json' diff --git a/python_apps/media-monitor2/configs/media-monitor.cfg b/python_apps/media-monitor2/configs/media-monitor.cfg deleted file mode 100644 index b1167f56b..000000000 --- a/python_apps/media-monitor2/configs/media-monitor.cfg +++ /dev/null @@ -1,31 +0,0 @@ -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' -rabbitmq_vhost = '/' - -############################################ -# 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. - -# MM2 only: -touch_interval = 5 -chunking_number = 450 -request_max_wait = 3.0 -rmq_event_wait = 0.1 -logpath = '/var/log/airtime/media-monitor/media-monitor.log' -index_path = '/var/tmp/airtime/media-monitor/last_index' - diff --git a/python_apps/monit/monit-airtime-generic.cfg b/python_apps/monit/monit-airtime-generic.cfg deleted file mode 100644 index 4bb0c6497..000000000 --- a/python_apps/monit/monit-airtime-generic.cfg +++ /dev/null @@ -1,6 +0,0 @@ - set daemon 10 # Poll at 10 second intervals - set logfile /var/log/monit.log - - set httpd port 2812 - allow admin:$admin_pass - allow guest:airtime read-only diff --git a/python_apps/monit/monit-airtime-rabbitmq-server.cfg b/python_apps/monit/monit-airtime-rabbitmq-server.cfg deleted file mode 100644 index 2ee2455a5..000000000 --- a/python_apps/monit/monit-airtime-rabbitmq-server.cfg +++ /dev/null @@ -1,7 +0,0 @@ - set daemon 10 # Poll at 5 second intervals - set logfile /var/log/monit.log - - check process rabbitmq-server - with pidfile "/var/run/airtime/rabbitmq.pid" - start program = "/bin/bash -c '/etc/init.d/rabbitmq-server start; /usr/lib/airtime/utils/rabbitmq-update-pid.sh'" - stop program = "/etc/init.d/rabbitmq-server stop" diff --git a/python_apps/pypo/install/pypo-copy-files.py b/python_apps/pypo/install/pypo-copy-files.py deleted file mode 100644 index 8009c6a8d..000000000 --- a/python_apps/pypo/install/pypo-copy-files.py +++ /dev/null @@ -1,140 +0,0 @@ -import os -import grp -import stat -import shutil -import sys -import subprocess -import random -import string -import re -from configobj import ConfigObj - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -def get_current_script_dir(): - current_script_dir = os.path.realpath(__file__) - index = current_script_dir.rindex('/') - return current_script_dir[0:index] - -def copy_dir(src_dir, dest_dir): - if (os.path.exists(dest_dir)) and (dest_dir != "/"): - shutil.rmtree(dest_dir) - if not (os.path.exists(dest_dir)): - #print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir) - shutil.copytree(src_dir, dest_dir) - -def create_dir(path): - try: - os.makedirs(path) - except Exception, e: - pass - -def get_rand_string(length=10): - return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(length)) - -def get_rand_string(length=10): - return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(length)) - -def get_monit_version(): - version = 0 - try: - p = subprocess.Popen(['monit', '-V'], stdout=subprocess.PIPE) - out = p.communicate()[0].strip() - search = re.search(r'This is Monit version (.*)\n', out, re.IGNORECASE) - - if search: - matches = search.groups() - if len(matches) == 1: - version = matches[0] - except Exception: - print "Could not get monit version" - - return version - -#return 1 if version1 > version2 -#return 0 if version1 == version2 -#return -1 if version1 < version2 -def version_compare(version1, version2): - def normalize(v): - return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] - return cmp(normalize(version1), normalize(version2)) - -PATH_INI_FILE = '/etc/airtime/pypo.cfg' - -try: - # Absolute path this script is in - current_script_dir = get_current_script_dir() - - if not os.path.exists(PATH_INI_FILE): - shutil.copy('%s/../pypo.cfg'%current_script_dir, PATH_INI_FILE) - - try: - os.remove("/etc/airtime/liquidsoap.cfg") - except Exception, e: - pass - gid = grp.getgrnam("pypo").gr_gid - os.chown("/etc/airtime", -1, gid) - os.chmod("/etc/airtime", stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) - - # load config file - try: - config = ConfigObj(PATH_INI_FILE) - except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - - #copy monit files - shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/') - subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True, close_fds=True) - - monit_version = get_monit_version() - if version_compare(monit_version, "5.3.0") >= 0: - shutil.copy('%s/../monit-airtime-liquidsoap.cfg' % current_script_dir, \ - '/etc/monit/conf.d/monit-airtime-liquidsoap.cfg') - else: - shutil.copy('%s/../monit-pre530-airtime-liquidsoap.cfg' % current_script_dir, \ - '/etc/monit/conf.d/monit-airtime-liquidsoap.cfg') - - shutil.copy('%s/../monit-airtime-playout.cfg'%current_script_dir, '/etc/monit/conf.d/') - - #create pypo log dir - create_dir(config['pypo_log_dir']) - os.system("chown -R pypo:pypo "+config["pypo_log_dir"]) - - #create liquidsoap log dir - create_dir(config['liquidsoap_log_dir']) - os.system("chown -R pypo:pypo "+config["liquidsoap_log_dir"]) - - #create cache, tmp, file dirs - create_dir(config['cache_dir']) - create_dir(config['file_dir']) - create_dir(config['tmp_dir']) - - create_dir(config["base_recorded_files"]) - - #copy files to bin dir - copy_dir("%s/.."%current_script_dir, config["bin_dir"]+"/bin/") - - # delete /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap.cfg - # as we don't use it anymore.(CC-2552) - os.remove(config["bin_dir"]+"/bin/liquidsoap_scripts/liquidsoap.cfg") - - #set permissions in bin dir and cache dir - os.system("chmod 755 "+os.path.join(config["bin_dir"], "bin/liquidsoap_scripts/notify.sh")) - os.system("chown -R pypo:pypo "+config["bin_dir"]) - os.system("chown -R pypo:pypo "+config["cache_base_dir"]) - os.system("chown -R pypo:pypo "+config["base_recorded_files"]) - - #copy init.d script - shutil.copy(config["bin_dir"]+"/bin/airtime-playout-init-d", "/etc/init.d/airtime-playout") - shutil.copy(config["bin_dir"]+"/bin/airtime-liquidsoap-init-d", "/etc/init.d/airtime-liquidsoap") - - #copy log rotate script - shutil.copy(config["bin_dir"]+"/bin/liquidsoap_scripts/airtime-liquidsoap.logrotate", "/etc/logrotate.d/airtime-liquidsoap") - -except Exception, e: - print e - - diff --git a/python_apps/pypo/install/pypo-initialize.py b/python_apps/pypo/install/pypo-initialize.py deleted file mode 100644 index 68fe858fb..000000000 --- a/python_apps/pypo/install/pypo-initialize.py +++ /dev/null @@ -1,95 +0,0 @@ -import platform -import shutil -from subprocess import Popen, PIPE -import subprocess -import sys -import os -sys.path.append('/usr/lib/airtime/') -from api_clients import api_client -from configobj import ConfigObj - -import logging - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -""" - This function returns the codename of the host OS by querying lsb_release. - If lsb_release does not exist, or an exception occurs the codename returned - is 'unknown' -""" -def get_os_codename(): - try: - p = Popen("which lsb_release > /dev/null", shell=True) - sts = os.waitpid(p.pid, 0)[1] - - if (sts == 0): - #lsb_release is available on this system. Let's get the os codename - p = Popen("lsb_release -sc", shell=True, stdout=PIPE) - codename = p.communicate()[0].strip('\r\n') - - p = Popen("lsb_release -sd", shell=True, stdout=PIPE) - fullname = p.communicate()[0].strip('\r\n') - - return (codename, fullname) - except Exception, e: - pass - - return ("unknown", "unknown") - -PATH_INI_FILE = '/etc/airtime/pypo.cfg' -PATH_LIQUIDSOAP_BIN = '/usr/lib/airtime/pypo/bin/liquidsoap_bin' - -#any debian/ubuntu codename in this et will automatically use the natty liquidsoap binary -arch_map = dict({"32bit":"i386", "64bit":"amd64"}) - -# load config file -try: - config = ConfigObj(PATH_INI_FILE) -except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - -try: - #select appropriate liquidsoap file for given system os/architecture - architecture = platform.architecture()[0] - arch = arch_map[architecture] - - print "* Detecting OS: ...", - (codename, fullname) = get_os_codename() - print " Found %s (%s) on %s architecture" % (fullname, codename, arch) - - print " * Creating symlink to Liquidsoap binary" - - p = Popen("which liquidsoap", shell=True, stdout=PIPE) - liq_path = p.communicate()[0].strip() - symlink_path = "/usr/bin/airtime-liquidsoap" - - if p.returncode == 0: - try: - os.unlink(symlink_path) - except Exception: - #liq_path DNE, which is OK. - pass - - os.symlink(liq_path, symlink_path) - else: - print " * Liquidsoap binary not found!" - sys.exit(1) - - #initialize init.d scripts - subprocess.call("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True) - subprocess.call("update-rc.d airtime-liquidsoap defaults >/dev/null 2>&1", shell=True) - - #clear out an previous pypo cache - print "* Clearing previous pypo cache" - subprocess.call("rm -rf /var/tmp/airtime/pypo/cache/scheduler/* >/dev/null 2>&1", shell=True) - - if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t": - print "* Waiting for pypo processes to start..." - subprocess.call("invoke-rc.d airtime-liquidsoap start > /dev/null 2>&1", shell=True) - subprocess.call("invoke-rc.d airtime-playout start > /dev/null 2>&1", shell=True) - -except Exception, e: - print e diff --git a/python_apps/pypo/install/pypo-remove-files.py b/python_apps/pypo/install/pypo-remove-files.py deleted file mode 100644 index 3a20a2dda..000000000 --- a/python_apps/pypo/install/pypo-remove-files.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import shutil -import sys -from configobj import ConfigObj - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -PATH_INI_FILE = '/etc/airtime/pypo.cfg' - -def remove_file(path): - try: - os.remove(path) - except Exception, e: - pass - -# load config file -try: - config = ConfigObj(PATH_INI_FILE) -except Exception, e: - print 'Error loading config file: ', e - sys.exit(1) - -try: - #remove log rotate script - print " * Removing Pypo Log Rotate Script" - remove_file("/etc/logrotate.d/airtime-liquidsoap") - - #remove init.d script - print " * Removing Pypo init.d Script" - remove_file("/etc/init.d/airtime-playout") - remove_file("/etc/init.d/airtime-liquidsoap") - - #remove bin, cache, tmp and file dir - print " * Removing Pypo Program Directory" - shutil.rmtree(config['bin_dir'], ignore_errors=True) - shutil.rmtree(config['cache_dir'], ignore_errors=True) - shutil.rmtree(config['file_dir'], ignore_errors=True) - shutil.rmtree(config['tmp_dir'], ignore_errors=True) - - #remove liquidsoap and pypo log dir - print " * Removing Pypo Log Directories" - shutil.rmtree(config['liquidsoap_log_dir'], ignore_errors=True) - shutil.rmtree(config['pypo_log_dir'], ignore_errors=True) - - #remove monit files - print " * Removing Pypo Monit Files" - remove_file("/etc/monit/conf.d/monit-airtime-playout.cfg") - remove_file("/etc/monit/conf.d/monit-airtime-liquidsoap.cfg") - remove_file("/etc/monit/conf.d/monit-airtime-generic.cfg") - -except Exception, e: - print e diff --git a/python_apps/pypo/install/pypo-uninitialize.py b/python_apps/pypo/install/pypo-uninitialize.py deleted file mode 100644 index 65ac91991..000000000 --- a/python_apps/pypo/install/pypo-uninitialize.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -import sys -import subprocess - -if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - -try: - #stop pypo and liquidsoap processes - print "Waiting for Pypo process to stop...", - try: - os.remove("/usr/bin/airtime-liquidsoap") - except Exception, e: - pass - if (os.path.exists('/etc/init.d/airtime-playout')): - subprocess.call("invoke-rc.d airtime-playout stop", shell=True) - print "OK" - else: - print "Wasn't running" - - print "Waiting for Liquidsoap process to stop...", - if (os.path.exists('/etc/init.d/airtime-liquidsoap')): - subprocess.call("invoke-rc.d airtime-liquidsoap stop", shell=True) - print "OK" - else: - print "Wasn't running" - - subprocess.call("update-rc.d -f airtime-playout remove".split(" ")) - subprocess.call("update-rc.d -f airtime-liquidsoap remove".split(" ")) - -except Exception, e: - print e diff --git a/python_apps/pypo/liquidsoap_bin b/python_apps/pypo/liquidsoap_bin deleted file mode 160000 index 492242f4b..000000000 --- a/python_apps/pypo/liquidsoap_bin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 492242f4bb7367afebbf2f096067cb5a5d3c0449 diff --git a/python_apps/pypo/monit-airtime-liquidsoap.cfg b/python_apps/pypo/monit-airtime-liquidsoap.cfg deleted file mode 100644 index ac5031c27..000000000 --- a/python_apps/pypo/monit-airtime-liquidsoap.cfg +++ /dev/null @@ -1,17 +0,0 @@ - set daemon 15 # Poll at 5 second intervals - set logfile /var/log/monit.log - - set httpd port 2812 - - check process airtime-liquidsoap matching "airtime-liquidsoap.*airtime.*ls_script" - if does not exist for 3 cycles then restart - - start program = "/etc/init.d/airtime-liquidsoap start" with timeout 30 seconds - stop program = "/etc/init.d/airtime-liquidsoap stop" - - if mem > 600 MB for 3 cycles then restart - if failed host localhost port 1234 - send "version\r\nexit\r\n" - expect "Liquidsoap" - with timeout 2 seconds retry 3 for 2 cycles - then restart diff --git a/python_apps/pypo/monit-airtime-playout.cfg b/python_apps/pypo/monit-airtime-playout.cfg deleted file mode 100644 index 9f0642bab..000000000 --- a/python_apps/pypo/monit-airtime-playout.cfg +++ /dev/null @@ -1,9 +0,0 @@ - set daemon 10 # Poll at 5 second intervals - set logfile /var/log/monit.log - - set httpd port 2812 - - check process airtime-playout - with pidfile "/var/run/airtime/airtime-playout.pid" - start program = "/etc/init.d/airtime-playout start" with timeout 5 seconds - stop program = "/etc/init.d/airtime-playout stop" diff --git a/python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg b/python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg deleted file mode 100644 index 0cf179831..000000000 --- a/python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg +++ /dev/null @@ -1,8 +0,0 @@ - set daemon 15 # Poll at 5 second intervals - set logfile /var/log/monit.log - - set httpd port 2812 - - check process airtime-liquidsoap with pidfile "/var/run/airtime/airtime-liquidsoap.pid" - start program = "/etc/init.d/airtime-liquidsoap start" with timeout 5 seconds - stop program = "/etc/init.d/airtime-liquidsoap stop" diff --git a/python_apps/pypo/AUTHORS b/python_apps/pypo/pypo/AUTHORS similarity index 100% rename from python_apps/pypo/AUTHORS rename to python_apps/pypo/pypo/AUTHORS diff --git a/python_apps/pypo/LICENSE b/python_apps/pypo/pypo/LICENSE similarity index 100% rename from python_apps/pypo/LICENSE rename to python_apps/pypo/pypo/LICENSE diff --git a/python_apps/pypo/__init__.py b/python_apps/pypo/pypo/__init__.py similarity index 100% rename from python_apps/pypo/__init__.py rename to python_apps/pypo/pypo/__init__.py diff --git a/python_apps/pypo/airtime-liquidsoap b/python_apps/pypo/pypo/airtime-liquidsoap similarity index 100% rename from python_apps/pypo/airtime-liquidsoap rename to python_apps/pypo/pypo/airtime-liquidsoap diff --git a/python_apps/pypo/airtime-liquidsoap-init-d b/python_apps/pypo/pypo/airtime-liquidsoap-init-d similarity index 75% rename from python_apps/pypo/airtime-liquidsoap-init-d rename to python_apps/pypo/pypo/airtime-liquidsoap-init-d index 181dbcc83..8cfafb4eb 100755 --- a/python_apps/pypo/airtime-liquidsoap-init-d +++ b/python_apps/pypo/pypo/airtime-liquidsoap-init-d @@ -56,37 +56,18 @@ stop () { sleep 2 } -start_with_monit () { - start - monit monitor airtime-liquidsoap >/dev/null 2>&1 -} - -stop_with_monit() { - monit unmonitor airtime-liquidsoap >/dev/null 2>&1 - stop -} - - - - case "${1:-''}" in 'stop') - echo "* Stopping Liquidsoap without notifying Monit process watchdog. If Monit is -* running it will automatically bring the Liquidsoap back up. You probably want -* 'stop-with-monit' instead of 'stop'." echo -n "Stopping $NAME: " stop echo "Done." ;; 'start') - echo "* Starting $NAME without Monit process watchdog. To make sure Monit is watching -* Liquidsoap, use 'start-with-monit' instead of 'start'." echo -n "Starting $NAME: " start echo "Done." ;; 'restart') - # restart commands here echo -n "Restarting $NAME: " stop start @@ -104,18 +85,6 @@ case "${1:-''}" in echo "$NAME is not running" exit 1 ;; - 'start-with-monit') - # restart commands here - echo -n "Starting $NAME: " - start_with_monit - echo "Done." - ;; - 'stop-with-monit') - # restart commands here - echo -n "Stopping $NAME: " - stop_with_monit - echo "Done." - ;; *) # no parameter specified echo "Usage: $SELF start|stop|restart|status" diff --git a/python_apps/pypo/airtime-playout b/python_apps/pypo/pypo/airtime-playout similarity index 100% rename from python_apps/pypo/airtime-playout rename to python_apps/pypo/pypo/airtime-playout diff --git a/python_apps/pypo/airtime-playout-init-d b/python_apps/pypo/pypo/airtime-playout-init-d similarity index 75% rename from python_apps/pypo/airtime-playout-init-d rename to python_apps/pypo/pypo/airtime-playout-init-d index 07dfc4476..adb223626 100755 --- a/python_apps/pypo/airtime-playout-init-d +++ b/python_apps/pypo/pypo/airtime-playout-init-d @@ -28,16 +28,6 @@ stop () { rm -f $PIDFILE } -start_with_monit() { - start - monit monitor airtime-playout >/dev/null 2>&1 -} - -stop_with_monit() { - monit unmonitor airtime-playout >/dev/null 2>&1 - stop -} - case "${1:-''}" in 'start') # start commands here @@ -58,18 +48,6 @@ case "${1:-''}" in start echo "Done." ;; - 'start-with-monit') - # restart commands here - echo -n "Starting $NAME: " - start_with_monit - echo "Done." - ;; - 'stop-with-monit') - # restart commands here - echo -n "Stopping $NAME: " - stop_with_monit - echo "Done." - ;; 'status') # status commands here diff --git a/python_apps/pypo/eventtypes.py b/python_apps/pypo/pypo/eventtypes.py similarity index 100% rename from python_apps/pypo/eventtypes.py rename to python_apps/pypo/pypo/eventtypes.py diff --git a/python_apps/pypo/liquidsoap_scripts/aac.liq b/python_apps/pypo/pypo/liquidsoap_scripts/aac.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/aac.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/aac.liq diff --git a/python_apps/pypo/liquidsoap_scripts/aacplus.liq b/python_apps/pypo/pypo/liquidsoap_scripts/aacplus.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/aacplus.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/aacplus.liq diff --git a/python_apps/pypo/liquidsoap_scripts/airtime-liquidsoap.logrotate b/python_apps/pypo/pypo/liquidsoap_scripts/airtime-liquidsoap.logrotate similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/airtime-liquidsoap.logrotate rename to python_apps/pypo/pypo/liquidsoap_scripts/airtime-liquidsoap.logrotate diff --git a/python_apps/pypo/liquidsoap_scripts/fdkaac.liq b/python_apps/pypo/pypo/liquidsoap_scripts/fdkaac.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/fdkaac.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/fdkaac.liq diff --git a/python_apps/pypo/liquidsoap_scripts/generate_liquidsoap_cfg.py b/python_apps/pypo/pypo/liquidsoap_scripts/generate_liquidsoap_cfg.py similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/generate_liquidsoap_cfg.py rename to python_apps/pypo/pypo/liquidsoap_scripts/generate_liquidsoap_cfg.py diff --git a/python_apps/pypo/liquidsoap_scripts/library/externals.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/externals.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/externals.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/externals.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/flows.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/flows.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/flows.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/flows.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/gstreamer.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/gstreamer.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/gstreamer.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/gstreamer.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/http.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/http.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/http.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/http.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/http_codes.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/http_codes.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/http_codes.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/http_codes.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/lastfm.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/lastfm.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/lastfm.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/lastfm.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/pervasives.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/pervasives.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/pervasives.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/pervasives.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/shoutcast.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/shoutcast.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/shoutcast.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/shoutcast.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/utils.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/utils.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/utils.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/utils.liq diff --git a/python_apps/pypo/liquidsoap_scripts/library/video_text.liq b/python_apps/pypo/pypo/liquidsoap_scripts/library/video_text.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/library/video_text.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/library/video_text.liq diff --git a/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg b/python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap.cfg similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg rename to python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap.cfg diff --git a/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py b/python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap_auth.py similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py rename to python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap_auth.py diff --git a/python_apps/pypo/liquidsoap_scripts/liquidsoap_prepare_terminate.py b/python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap_prepare_terminate.py similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/liquidsoap_prepare_terminate.py rename to python_apps/pypo/pypo/liquidsoap_scripts/liquidsoap_prepare_terminate.py diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/pypo/liquidsoap_scripts/ls_lib.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/ls_lib.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/ls_lib.liq diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/pypo/liquidsoap_scripts/ls_script.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/ls_script.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/ls_script.liq diff --git a/python_apps/pypo/liquidsoap_scripts/mp3.liq b/python_apps/pypo/pypo/liquidsoap_scripts/mp3.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/mp3.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/mp3.liq diff --git a/python_apps/pypo/liquidsoap_scripts/notify.sh b/python_apps/pypo/pypo/liquidsoap_scripts/notify.sh similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/notify.sh rename to python_apps/pypo/pypo/liquidsoap_scripts/notify.sh diff --git a/python_apps/pypo/liquidsoap_scripts/ogg.liq b/python_apps/pypo/pypo/liquidsoap_scripts/ogg.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/ogg.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/ogg.liq diff --git a/python_apps/pypo/liquidsoap_scripts/opus.liq b/python_apps/pypo/pypo/liquidsoap_scripts/opus.liq similarity index 100% rename from python_apps/pypo/liquidsoap_scripts/opus.liq rename to python_apps/pypo/pypo/liquidsoap_scripts/opus.liq diff --git a/python_apps/pypo/listenerstat.py b/python_apps/pypo/pypo/listenerstat.py similarity index 100% rename from python_apps/pypo/listenerstat.py rename to python_apps/pypo/pypo/listenerstat.py diff --git a/python_apps/pypo/logging.cfg b/python_apps/pypo/pypo/logging.cfg similarity index 100% rename from python_apps/pypo/logging.cfg rename to python_apps/pypo/pypo/logging.cfg diff --git a/python_apps/pypo/media/__init__.py b/python_apps/pypo/pypo/media/__init__.py similarity index 100% rename from python_apps/pypo/media/__init__.py rename to python_apps/pypo/pypo/media/__init__.py diff --git a/python_apps/pypo/media/update/__init__.py b/python_apps/pypo/pypo/media/update/__init__.py similarity index 100% rename from python_apps/pypo/media/update/__init__.py rename to python_apps/pypo/pypo/media/update/__init__.py diff --git a/python_apps/pypo/media/update/replaygain.py b/python_apps/pypo/pypo/media/update/replaygain.py similarity index 100% rename from python_apps/pypo/media/update/replaygain.py rename to python_apps/pypo/pypo/media/update/replaygain.py diff --git a/python_apps/pypo/media/update/replaygainupdater.py b/python_apps/pypo/pypo/media/update/replaygainupdater.py similarity index 100% rename from python_apps/pypo/media/update/replaygainupdater.py rename to python_apps/pypo/pypo/media/update/replaygainupdater.py diff --git a/python_apps/pypo/media/update/silananalyzer.py b/python_apps/pypo/pypo/media/update/silananalyzer.py similarity index 100% rename from python_apps/pypo/media/update/silananalyzer.py rename to python_apps/pypo/pypo/media/update/silananalyzer.py diff --git a/python_apps/pypo/notify_logging.cfg b/python_apps/pypo/pypo/notify_logging.cfg similarity index 100% rename from python_apps/pypo/notify_logging.cfg rename to python_apps/pypo/pypo/notify_logging.cfg diff --git a/python_apps/pypo/pure.py b/python_apps/pypo/pypo/pure.py similarity index 100% rename from python_apps/pypo/pure.py rename to python_apps/pypo/pypo/pure.py diff --git a/python_apps/pypo/pypo.cfg b/python_apps/pypo/pypo/pypo.cfg similarity index 100% rename from python_apps/pypo/pypo.cfg rename to python_apps/pypo/pypo/pypo.cfg diff --git a/python_apps/pypo/pypocli.py b/python_apps/pypo/pypo/pypocli.py similarity index 100% rename from python_apps/pypo/pypocli.py rename to python_apps/pypo/pypo/pypocli.py diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypo/pypofetch.py similarity index 100% rename from python_apps/pypo/pypofetch.py rename to python_apps/pypo/pypo/pypofetch.py diff --git a/python_apps/pypo/pypofile.py b/python_apps/pypo/pypo/pypofile.py similarity index 100% rename from python_apps/pypo/pypofile.py rename to python_apps/pypo/pypo/pypofile.py diff --git a/python_apps/pypo/pypoliqqueue.py b/python_apps/pypo/pypo/pypoliqqueue.py similarity index 100% rename from python_apps/pypo/pypoliqqueue.py rename to python_apps/pypo/pypo/pypoliqqueue.py diff --git a/python_apps/pypo/pypoliquidsoap.py b/python_apps/pypo/pypo/pypoliquidsoap.py similarity index 100% rename from python_apps/pypo/pypoliquidsoap.py rename to python_apps/pypo/pypo/pypoliquidsoap.py diff --git a/python_apps/pypo/pypomessagehandler.py b/python_apps/pypo/pypo/pypomessagehandler.py similarity index 100% rename from python_apps/pypo/pypomessagehandler.py rename to python_apps/pypo/pypo/pypomessagehandler.py diff --git a/python_apps/pypo/pyponotify.py b/python_apps/pypo/pypo/pyponotify.py similarity index 100% rename from python_apps/pypo/pyponotify.py rename to python_apps/pypo/pypo/pyponotify.py diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypo/pypopush.py similarity index 100% rename from python_apps/pypo/pypopush.py rename to python_apps/pypo/pypo/pypopush.py diff --git a/python_apps/pypo/recorder.py b/python_apps/pypo/pypo/recorder.py similarity index 100% rename from python_apps/pypo/recorder.py rename to python_apps/pypo/pypo/recorder.py diff --git a/python_apps/pypo/telnetliquidsoap.py b/python_apps/pypo/pypo/telnetliquidsoap.py similarity index 100% rename from python_apps/pypo/telnetliquidsoap.py rename to python_apps/pypo/pypo/telnetliquidsoap.py diff --git a/python_apps/pypo/testpypoliqqueue.py b/python_apps/pypo/pypo/testpypoliqqueue.py similarity index 100% rename from python_apps/pypo/testpypoliqqueue.py rename to python_apps/pypo/pypo/testpypoliqqueue.py diff --git a/python_apps/pypo/tests/run_tests.sh b/python_apps/pypo/pypo/tests/run_tests.sh similarity index 100% rename from python_apps/pypo/tests/run_tests.sh rename to python_apps/pypo/pypo/tests/run_tests.sh diff --git a/python_apps/pypo/tests/test_modify_cue_in.py b/python_apps/pypo/pypo/tests/test_modify_cue_in.py similarity index 100% rename from python_apps/pypo/tests/test_modify_cue_in.py rename to python_apps/pypo/pypo/tests/test_modify_cue_in.py diff --git a/python_apps/pypo/timeout.py b/python_apps/pypo/pypo/timeout.py similarity index 100% rename from python_apps/pypo/timeout.py rename to python_apps/pypo/pypo/timeout.py diff --git a/python_apps/remove-pypo-user.py b/python_apps/remove-pypo-user.py deleted file mode 100644 index 4e29e78e5..000000000 --- a/python_apps/remove-pypo-user.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import sys -import time - -def remove_user(username): - os.system("killall -u %s 1>/dev/null 2>&1" % username) - - #allow all process to be completely closed before we attempt to delete user - print "Waiting for processes to close..." - time.sleep(3) - - os.system("deluser --remove-home " + username + " 1>/dev/null 2>&1") - -if __name__ == "__main__": - if os.geteuid() != 0: - print "Please run this as root." - sys.exit(1) - - remove_user("pypo")