-
-
Save douglascabral/04c876c94e70ec76196475a53c4587d5 to your computer and use it in GitHub Desktop.
Kong init.d
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 | |
# | |
# chkconfig: - 80 45 | |
# description: Starts and stops Kong | |
# Enable: http://manpages.ubuntu.com/manpages/zesty/man8/update-rc.d.8.html | |
# update deamon path to point to the kong executable | |
start() { | |
echo -n "Starting Kong... " | |
kong start | |
echo "OK" | |
return 0 | |
} | |
stop() { | |
echo -n "Stopping Kong... " | |
kong stop | |
echo "OK" | |
return 0 | |
} | |
restart() { | |
echo -n "Restarting Kong... " | |
kong restart | |
echo "OK" | |
return 0 | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
restart | |
;; | |
*) | |
echo $"Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment