Skip to content

Instantly share code, notes, and snippets.

@whittlem
Created September 7, 2020 14:52
Show Gist options
  • Save whittlem/c264ad52eabca17e9f8d94ae2037f1fc to your computer and use it in GitHub Desktop.
Save whittlem/c264ad52eabca17e9f8d94ae2037f1fc to your computer and use it in GitHub Desktop.
#!/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