From 5af80fcfe3e63c33f1f87109a035573280bd2c58 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 11 Sep 2014 12:48:15 -0400 Subject: [PATCH 1/2] Updated Ubuntu airtime-full-install to fix apache version issue --- install_full/ubuntu/airtime-full-install | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index 7fae5aedd..2a2fa824c 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -29,6 +29,8 @@ echo "----------------------------------------------------" dist=`lsb_release -is` code=`lsb_release -cs` +apache2 -v | grep "2\.4" > /dev/null +apacheversion=$? #enable squeeze backports to get lame packages if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then @@ -130,16 +132,18 @@ else echo "----------------------------------------------------" echo "2.1 Apache Config File" echo "----------------------------------------------------" - if [ ! -f /etc/apache2/sites-available/airtime ]; then + + 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..." - if [ "$dist" = "Ubuntu" -a "$code" = "saucy" ]; then - cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime.conf - a2dissite 000-default - else - cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime - a2dissite default - fi + cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/$airtimeconfigfile + a2dissite 000-default a2ensite airtime else echo "Apache config for Airtime already exists..." @@ -205,4 +209,4 @@ echo "----------------------------------------------------" cd $SCRIPTPATH/../../install_minimal # Restart apache to clear php cache service apache2 restart -./airtime-install \ No newline at end of file +./airtime-install From 0c538ff1aec172eaa123410bd5d77e2a4bbf52af Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 17 Sep 2014 13:21:08 -0400 Subject: [PATCH 2/2] Added chown call to properly permission stor directory --- install_minimal/include/AirtimeInstall.php | 1 + 1 file changed, 1 insertion(+) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index 4d037596e..e6a90915e 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -177,6 +177,7 @@ class AirtimeInstall } 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); }