Skip to content

Instantly share code, notes, and snippets.

@projectivemotion
Created December 29, 2016 00:45
Show Gist options
  • Save projectivemotion/444edd36a638684d4f116e557e28bb8b to your computer and use it in GitHub Desktop.
Save projectivemotion/444edd36a638684d4f116e557e28bb8b to your computer and use it in GitHub Desktop.
Provision Homestead Vagrant with php5.6
#!/bin/bash
# save as after.sh in project root then run vagrant up
if [ "$USER" != "root" ] ; then
sudo /bin/bash "$0"
exit 0
fi
# install php5.6
apt-get update -y
apt-get install -y php5.6-fpm
dpkg --get-selections | grep php7.1 | sed 's/7.1/5.6/' | cut -f1 | xargs apt-get install -y
cp -b /etc/php/7.1/fpm/pool.d/www.conf /etc/php/5.6/fpm/pool.d/www.conf
cp -b /etc/php/7.1/fpm/php.ini /etc/php/5.6/fpm/php.ini
sed -i 's/7.1/5.6/' /etc/php/5.6/fpm/pool.d/www.conf /etc/nginx/sites-available/homestead.app
systemctl restart php5.6-fpm
systemctl restart nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment