Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jonhattan
jonhattan / drupal-install.sh
Last active September 17, 2016 08:48
Helper script to set up a Drupal installation. It assumes a Debian-like OS with Apache 2.4 and Drush installed. Also requires a .my.cnf file in the current user's home directory with mysql root-alike credentials. Site is installed at /var/www/${SITE}/docroot. A database, a virtualhost and an entry at /etc/hosts named ${SITE} are created. The scr…
#!/bin/bash
# Check arguments and requirements.
if [ ${#@} -lt 1 ]; then
echo "This script expects one argument (site machine name)."
exit 1
fi
if [ -x ${HOME}/.my.cnf ]; then
echo "This script requires ${HOME}/.my.cnf."