Created
August 7, 2013 05:55
-
-
Save sondr3/6171581 to your computer and use it in GitHub Desktop.
Apache 2.4 init.d script for Debian 7
This file contains hidden or 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 ..." | |
# Change the location to your specific location | |
/usr/local/apache2/bin/apachectl start | |
;; | |
stop) | |
echo "Stopping Apache ..." | |
# Change the location to your specific location | |
/usr/local/apache2/bin/apachectl stop | |
;; | |
graceful) | |
echo "Restarting Apache gracefully..." | |
# Change the location to your specific location | |
/usr/local/apache2/bin/apachectl graceful | |
;; | |
restart) | |
echo "Restarting Apache ..." | |
# Change the location to your specific location | |
/usr/local/apache2/bin/apachectl restart | |
;; | |
*) | |
echo "Usage: '$0' {start|stop|restart|graceful}" | |
exit 64 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment