Skip to content

Instantly share code, notes, and snippets.

@expertjtb
Created March 9, 2017 14:19
Show Gist options
  • Save expertjtb/42a9d6625c3abf5109473266649ab81f to your computer and use it in GitHub Desktop.
Save expertjtb/42a9d6625c3abf5109473266649ab81f to your computer and use it in GitHub Desktop.
#!/bin/bash -x
#
# Mautic Installation Shell to Cloud9:
# ----------
# Version 2.0
# By expertjtb
# INSTRUCTION:
# ----------
# USE IT AT YOUR OWN RISK!
# LICENSE: GPL V2
# VARIABLES
# ----------
DOWNLOAD_URL="https://github.com/mautic/mautic/archive/staging.zip"
DESTINATION="/home/ubuntu/workspace"
VERSION="2.7.0"
INSTALL_LEMP="yes"
LEMP_NGINX_CONFIG="https://gist.githubusercontent.com/expertjtb/62dd52f6e9f40a4623b7755c2c2d764f/raw/083078f454ff8b40dae152500c0b4f50f7ea2646/imp-installer"
# EXEC
# ----------
cd ${DESTINATION}
if [ "$INSTALL_LEMP" = "yes" ]; then
curl -L https://raw.githubusercontent.com/GabrielGil/c9-lemp/master/install.sh | bash
sudo rm -f /etc/nginx/sites-enabled/c9
sudo rm -f /etc/nginx/sites-available/c9
sudo wget ${LEMP_NGINX_CONFIG} --output-document=/etc/nginx/sites-available/c9
sudo chmod 755 /etc/nginx/sites-available/c9
sudo ln -s /etc/nginx/sites-available/c9 /etc/nginx/sites-enabled/c9
sudo apt-get -qq install mcrypt php7.0-mcrypt
lemp restart
lemp status
fi
wget ${DOWNLOAD_URL}
unzip ${VERSION}.zip
mv mautic-${VERSION}/* ./
rm -rf mautic-${VERSION}
rm ${VERSION}.zip
composer install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment