Skip to content

Instantly share code, notes, and snippets.

@douglascabral
Last active July 30, 2018 20:20
Show Gist options
  • Save douglascabral/04c876c94e70ec76196475a53c4587d5 to your computer and use it in GitHub Desktop.
Save douglascabral/04c876c94e70ec76196475a53c4587d5 to your computer and use it in GitHub Desktop.
Kong init.d
#!/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