webdevelopment server script
Here is a small script I made for starting Apache & MySQL services in linux.
#!/bin/bash # /etc/rc.d/webdev # Website Start/Stop Script # # B.Walden 14/03/2009 # Colors blue="\033[1;34m" green="\033[1;32m" red="\033[1;31m" bold="\033[1;37m" reset="\033[0m" # Check for root if [ $(whoami) != "root" ]; then echo -e $red"error:$reset you cannot perform this operation unless you are root." exit 1 fi case "$1" in start) /etc/rc.d/mysqld start /etc/rc.d/httpd start ;; stop) /etc/rc.d/mysqld stop /etc/rc.d/httpd stop ;; restart) $0 stop sleep 3 $0 start ;; *) echo "usage: $0 {start|stop|restart}" esac exit 0





