-
-
Save MDXDave/13c367c20d89b162269e to your computer and use it in GitHub Desktop.
Apache 2.4 Start-/Stop-Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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