Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 55 lines (51 sloc) 1.032 kb
#!/usr/bin/env zsh
# Usage: a apache [action]
# Summary: Manage or configure Apache
# Help: Use for common Apache actions.
# Available operations:
#
# config: edit httpd.conf
# check: test configuration syntax
# vhosts: edit httpd-vhosts.conf
#
# Furthermore, start, stop, graceful and graceful-stop are
# passed along directly to apachectl.
set -e
# Provide a completions
if [ "$1" = "--complete" ]; then
echo "start"
echo "graceful-stop"
echo "stop"
echo "restart"
echo "vhosts"
echo "config"
echo "check"
exit
fi
case "$1" in
start)
sudo apachectl start
;;
graceful-stop)
sudo apachectl graceful-stop
;;
stop)
sudo apachectl stop
;;
restart)
sudo apachectl graceful
;;
check)
sudo apachectl configtest
;;
config)
sudo vim /etc/apache2/httpd.conf
;;
vhosts)
sudo vim /etc/apache2/extra/httpd-vhosts.conf
;;
*)
echo "Unrecognized subcommand $@."
echo "Use a help apache for usage information"
exit 1;
esac
Jump to Line
Something went wrong with that request. Please try again.