Created
September 7, 2020 14:52
-
-
Save whittlem/c264ad52eabca17e9f8d94ae2037f1fc to your computer and use it in GitHub Desktop.
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: apache | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: apache | |
# Description: Start apache | |
### END INIT INFO | |
case "$1" in | |
start) | |
echo "Starting Apache ..." | |
/opt/SP/apache-2.4/bin/apachectl start | |
;; | |
stop) | |
echo "Stopping Apache ..." | |
/opt/SP/apache-2.4/bin/apachectl stop | |
;; | |
graceful) | |
echo "Restarting Apache gracefully..." | |
/opt/SP/apache-2.4/bin/apachectl graceful | |
;; | |
restart) | |
echo "Restarting Apache ..." | |
/opt/SP/apache-2.4/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