Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ps ax | grep [m]ysqld > /dev/null
- if [ $? -eq 1 ]; then
- #echo "Starting MySQL."
- ## changed for homebrew mysql install
- ## sudo /usr/local/mysql/share/mysql/mysql.server start
- mysql.server start
- echo
- #exit 0
- else
- echo "MySQL is already running."
- echo
- #exit 0
- fi
- ps ax | grep [h]ttpd > /dev/null
- if [ $? -eq 1 ]; then
- echo "Starting Apache."
- sudo /usr/sbin/apachectl restart
- echo
- #exit 0
- else
- echo "Apache is already running."
- echo
- #exit 0
- fi
- exit 0
Add Comment
Please, Sign In to add comment