I ran this setup file after pulling down this repo. Now my MAMP server isn't working correctly. I think this file made changes to the Apache server config or something. Does anyone know what this file does, and how to undo it?
#Add the entry to /etc/hosts
#http://stackoverflow.com/questions/11287861/how-to-check-if-a-file-contains-a-specific-string-using-bash
HOST_ENTRY="127.0.0.1 $sitename.dev"
if grep -q "$HOST_ENTRY" "/etc/hosts"; then
echo "Entry already exists in /etc/hosts"
else
#https://blogs.oracle.com/joshis/entry/sudo_echo_does_not_work
sudo sh -c "echo $HOST_ENTRY >> /etc/hosts"
echo "Added entry to /etc/hosts file"
fi
#http://stackoverflow.com/questions/598190/mysql-check-if-the-user-exists-and-drop-it
#DBD=${dbuser}\\_%
#USAGE="*.*"
#sql="CREATE DATABASE IF NOT EXISTS $dbname;"
#sql+="GRANT USAGE ON *.* TO ${dbuser}@localhost;"
#sql+="DROP USER '${dbuser}'@'localhost';"
#sql+="CREATE USER '${dbuser}'@'localhost' IDENTIFIED BY '${dbpass}';"
#sql+="GRANT ALL PRIVILEGES ON \`$DBD\`.* TO ${dbuser}@localhost;"
#out=$(mysql -hlocalhost -uroot -e "${sql}")
# restart apache
sudo apachectl graceful
cd $DATA_DIR/../
mkdir cache
#./symfony project:permissions
npm install
bower install
composer install
gulp
open http://$sitename.dev
I've tried restarting my computer, changing directories in MAMP starting point, and tried different ports, but it's still not going where I want it to.