mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
allows zeppelin to be run and managed as a service. Jira Ticket ZEPPELIN-641
This commit is contained in:
parent
e6447b256a
commit
06ed0a3758
1 changed files with 14 additions and 1 deletions
|
|
@ -21,7 +21,7 @@
|
|||
# description: Start and stop daemon script for.
|
||||
#
|
||||
|
||||
USAGE="Usage: zeppelin-daemon.sh [--config <conf-dir>] {start|stop|restart|reload|status}"
|
||||
USAGE="Usage: zeppelin-daemon.sh [--config <conf-dir>] {start|stop|upstart|restart|reload|status}"
|
||||
|
||||
if [[ "$1" == "--config" ]]; then
|
||||
shift
|
||||
|
|
@ -159,6 +159,16 @@ function check_if_process_is_alive() {
|
|||
fi
|
||||
}
|
||||
|
||||
function upstart() {
|
||||
|
||||
# upstart() allows zeppelin to be run and managed as a service
|
||||
# for example, this could be called from an upstart script in /etc/init
|
||||
# where the service manager starts and stops the process
|
||||
initialize_default_directories
|
||||
|
||||
$ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}"
|
||||
}
|
||||
|
||||
function start() {
|
||||
local pid
|
||||
|
||||
|
|
@ -241,6 +251,9 @@ case "${1}" in
|
|||
stop)
|
||||
stop
|
||||
;;
|
||||
upstart)
|
||||
upstart
|
||||
;;
|
||||
reload)
|
||||
stop
|
||||
start
|
||||
|
|
|
|||
Loading…
Reference in a new issue