From 0d38e1c771e433ddc6c47036ba4e61055d9c1dee Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 18 Dec 2013 17:34:41 -0500 Subject: [PATCH] CC-5650 : Full Install doesn't work for apache 2.4 --- install_full/apache/airtime-vhost | 12 -------- install_full/php5/airtime.ini | 3 -- install_full/ubuntu/airtime-full-install | 39 +++++++++++++++--------- 3 files changed, 25 insertions(+), 29 deletions(-) delete mode 100644 install_full/apache/airtime-vhost 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/php5/airtime.ini b/install_full/php5/airtime.ini index 829e5edd0..e35f600b0 100644 --- a/install_full/php5/airtime.ini +++ b/install_full/php5/airtime.ini @@ -3,6 +3,3 @@ 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 index 88adcd783..1273a35be 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -59,7 +59,7 @@ 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 memcached php5-memcached +pwgen libfaad2 memcached php5-memcached php5-json #install packages with --force-yes option (this is useful in the case @@ -130,20 +130,33 @@ else echo "----------------------------------------------------" echo "2.1 Apache Config File" echo "----------------------------------------------------" - if [ ! -f /etc/apache2/sites-available/airtime ]; then - echo "Creating Apache config for Airtime..." - - if [ "$dist" = "Ubuntu" -a "$code" = "saucy" ]; then - cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime.conf - a2dissite 000-default + + vregex='(Apache\/2\.4)' + apachev=`apache2 -v | grep 'Server version'` + echo "$apachev" + + if [[ "$apachev" =~ $vregex ]] + then + #Apache is version 2.4 + + if [ ! -f /etc/apache2/sites-available/airtime.conf ]; then + echo "Creating Apache config for Airtime..." + cp $SCRIPTPATH/../apache/2.4/airtime-vhost /etc/apache2/sites-available/airtime.conf else - cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime - a2dissite default + echo "Apache config for Airtime already exists..." fi - a2ensite airtime else - echo "Apache config for Airtime already exists..." + #Apache is older, use 2.2 config. + + if [ ! -f /etc/apache2/sites-available/airtime ]; then + echo "Creating Apache config for Airtime..." + cp $SCRIPTPATH/../apache/2.2/airtime-vhost /etc/apache2/sites-available/airtime + else + echo "Apache config for Airtime already exists..." + fi fi + + a2ensite airtime if [ ! -d /usr/share/airtime/public ]; then echo "Creating Apache web root directory..." @@ -156,7 +169,7 @@ else echo "----------------------------------------------------" echo "2.2 PHP Config File for Apache" echo "----------------------------------------------------" - if [ ! -f /etc/php5/apache2/airtime.ini ]; then + if [ ! -f /etc/php5/apache2/conf.d/airtime.ini ]; then echo "Creating Airtime PHP config for Apache..." cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/conf.d/airtime.ini else @@ -203,6 +216,4 @@ echo "----------------------------------------------------" echo "5. Run Airtime Install" echo "----------------------------------------------------" cd $SCRIPTPATH/../../install_minimal -# Restart apache to clear php cache -service apache2 restart ./airtime-install \ No newline at end of file