Skip to content

Instantly share code, notes, and snippets.

@jeremyvdw
Created June 22, 2015 08:35
Show Gist options
  • Save jeremyvdw/b0a0cb270575f9a200b7 to your computer and use it in GitHub Desktop.
Save jeremyvdw/b0a0cb270575f9a200b7 to your computer and use it in GitHub Desktop.
Confluent schema-registry basic startup
#!/bin/bash
#
#
# init script for the Confluent schema-registry
#
# chkconfig: 2345 90 10
# description: Confluent schema-registry
### BEGIN INIT INFO
# Provides: schema-registry
# Required-Start: cloudera-scm-agent
# Should-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Confluent schema-registry
# Description: Confluent schema-registry
### END INIT INFO
RUN_CLASS=/usr/bin/schema-registry-run-class
CLASS_FILE=io.confluent.kafka.schemaregistry.rest.Main
PROPERTIES_FILE=/etc/schema-registry/schema-registry.properties
start() {
# exec
exec $RUN_CLASS -daemon $CLASS_FILE $PROPERTIES_FILE
}
stop() {
schema-registry-stop
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $prog {start|stop|restart}"
RETVAL=3
esac
exit $RETVAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment