Skip to content

Instantly share code, notes, and snippets.

@zachfedor
Last active August 29, 2015 14:16
Show Gist options
  • Save zachfedor/3e1b82ad4e546a0a4d19 to your computer and use it in GitHub Desktop.
Save zachfedor/3e1b82ad4e546a0a4d19 to your computer and use it in GitHub Desktop.
function mamptowordpress {
dir=/Applications/MAMP/conf/apache
rm $dir/httpd.conf
ln -s $dir/httpd-wordpress.conf $dir/httpd.conf
stopMAMP
# startMAMP
echo "Happy Wordpress Developing!"
}
function mamptomagento {
dir=/Applications/MAMP/conf/apache
rm $dir/httpd.conf
ln -s $dir/httpd-magento.conf $dir/httpd.conf
stopMAMP
# startMAMP
echo "Happy Magento Developing!"
}
function stopMAMP {
if test -f /Applications/MAMP/Library/logs/httpd.pid; then
echo "Stopping Mamp Apache Server..."
/Applications/MAMP/Library/bin/apachectl -f"/Applications/MAMP/conf/apache/httpd.conf" -k stop
fi
if test -f /Applications/MAMP/tmp/mysql/mysql.pid; then
echo "Stopping MAMP MySQL Server..."
/bin/kill `cat /Applications/MAMP/tmp/mysql/mysql.pid`
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment