Skip to content

Commit

Permalink
Disable exit on error when checking if apache2.4 is installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertElder committed Oct 10, 2014
1 parent 736acda commit 874adf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install_full/ubuntu/airtime-full-install
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ echo "----------------------------------------------------"

dist=`lsb_release -is`
code=`lsb_release -cs`
set +e
apache2 -v | grep "2\.4" > /dev/null
apacheversion=$?
set -e

#enable squeeze backports to get lame packages
if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then
Expand Down

2 comments on commit 874adf0

@Robbt
Copy link
Contributor

@Robbt Robbt commented on 874adf0 Oct 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am installing Airtime on a fresh Ubuntu 14.04 and I ran into the error Apache2 command not found when trying to install airtime and then it failed to create the virtualhost and I basically needed to rerun the install process again and it appeared to work. So perhaps this apache version check should happen after the packages are installed ?

@RobertElder
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Robbt, sorry for taking a while to get back to you. I'm aware of a number of potential improvements to the install process, and I've spent a bit of time to apply some of them. The specific fix that this particular commit is performing is to turn off exiting on errors temporarily while we attempt to determine whether apache 2.4 is installed or not. If apache 2.4 is not installed, the line

apache2 -v | grep "2.4" > /dev/null

returns an error code, which makes the script exit immediately and never execute the next line.

For a fresh installation, it would certainly make sense to check the Apache version after packages are installed. I believe the original desire to add this specific apache version check was motivated by an installation where Apache was already installed. I didn't add the original Apache version check, so I can't comment further.

Please sign in to comment.