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