Skip to content

Commit

Permalink
Merge commit '2ac62562aed6399424ae651c78a08224e714c487' into theand1404
Browse files Browse the repository at this point in the history
* commit '2ac62562aed6399424ae651c78a08224e714c487':
  Moving the creation of COMPOSER_HOME
  Fixing composer.sh, ref fideloper#491
  Update Elasticsearch version
  vagrantfile for 1.4.1 release
  mpm_event is enabled by default, disable mpm_prefork and mpm_worker to ensure no conflicts
  Remove apache2-mpm-event...it looks to be apart of the default install of apache2

Conflicts:
	scripts/apache.sh
  • Loading branch information
theand committed Sep 5, 2015
2 parents 4c44534 + 2ac6256 commit a811b6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "1.4.0"
github_branch = "1.4.1"
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"

# Because this:https://developer.github.com/changes/2014-12-08-removing-authorizations-token/
Expand Down
6 changes: 3 additions & 3 deletions scripts/apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sudo apt-get update

# Install Apache
# -qq implies -y --force-yes
sudo apt-get install -qq apache2 #apache2-mpm-event
sudo apt-get install -qq apache2

echo ">>> Configuring Apache"

Expand All @@ -48,9 +48,9 @@ sudo usermod -a -G www-data vagrant
# Apache Config
# On separate lines since some may cause an error
# if not installed
sudo a2dismod mpm_prefork
sudo a2dismod mpm_prefork mpm_worker
sudo a2dismod php5
sudo a2enmod mpm_worker rewrite actions ssl
sudo a2enmod rewrite actions ssl
cat /vagrant/helpers/vhost.sh > vhost
sudo chmod guo+x vhost
sudo mv vhost /usr/local/bin
Expand Down
24 changes: 11 additions & 13 deletions scripts/composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ HHVM_IS_INSTALLED=$?
composer -v > /dev/null 2>&1
COMPOSER_IS_INSTALLED=$?

# Contains all arguments that are passed
COMPOSER_ARG=($@)

GITHUB_OAUTH=${COMPOSER_ARG[0]}
COMPOSER_PACKAGES=${COMPOSER_ARG[@]:1}
# Getting the arguments
GITHUB_OAUTH=$1
COMPOSER_PACKAGES=$2

# True, if composer is not installed
if [[ $COMPOSER_IS_INSTALLED -ne 0 ]]; then
Expand Down Expand Up @@ -51,7 +49,7 @@ else
if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
sudo hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer self-update
else
sudo composer self-update
composer self-update
fi
fi

Expand All @@ -64,15 +62,9 @@ fi

# Install Global Composer Packages if any are given
if [[ ! -z $COMPOSER_PACKAGES ]]; then

echo ">>> Installing Global Composer Packages:"
echo " " ${COMPOSER_PACKAGES[@]}
if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer global require ${COMPOSER_PACKAGES[@]}
else
composer global require ${COMPOSER_PACKAGES[@]}
fi


# Add Composer's Global Bin to ~/.profile path
if [[ -f "/home/vagrant/.profile" ]]; then
if ! grep -qsc 'COMPOSER_HOME=' /home/vagrant/.profile; then
Expand All @@ -85,4 +77,10 @@ if [[ ! -z $COMPOSER_PACKAGES ]]; then
. /home/vagrant/.profile
fi
fi

if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer global require ${COMPOSER_PACKAGES[@]}
else
composer global require ${COMPOSER_PACKAGES[@]}
fi
fi
2 changes: 1 addition & 1 deletion scripts/elasticsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo ">>> Installing Elasticsearch"

# Set some variables
ELASTICSEARCH_VERSION=1.6.0 # Check https://www.elastic.co/downloads/elasticsearch for latest version
ELASTICSEARCH_VERSION=1.7.1 # Check https://www.elastic.co/downloads/elasticsearch for latest version

# Install prerequisite: Java
# -qq implies -y --force-yes
Expand Down

0 comments on commit a811b6a

Please sign in to comment.