Skip to content

Instantly share code, notes, and snippets.

@MDXDave

MDXDave/apache2 Secret

Created Apr 8, 2015
Embed
What would you like to do?
Apache 2.4 Start-/Stop-Script
#!/bin/sh
### BEGIN INIT INFO
# Provides: apache2
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: apache2
# Description: httpd server for serving web content
### END INIT INFO
case "$1" in
start)
echo "Starting Apache ..."
/opt/apache2/bin/apachectl start
;;
stop)
echo "Stopping Apache ..."
/opt/apache2/bin/apachectl stop
;;
reload)
echo "Restarting Apache gracefully..."
/opt/apache2/bin/apachectl graceful
;;
restart)
echo "Restarting Apache ..."
/opt/apache2/bin/apachectl restart
;;
*)
echo "Usage: '$0' {start|stop|restart|reload}"
exit 64
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.