Skip to content

Instantly share code, notes, and snippets.

@sowe
Created January 30, 2016 20:11
Show Gist options
  • Save sowe/7078893bf9872cec2408 to your computer and use it in GitHub Desktop.
Save sowe/7078893bf9872cec2408 to your computer and use it in GitHub Desktop.
Azkaban
#!/bin/sh
#
# azkaban This shell script takes care of starting and stopping
# the azkaban
#
# Source function library
. /etc/rc.d/init.d/functions
# Do preliminary checks here, if any
#### START of preliminary checks #########
##### END of preliminary checks #######
# Handle manual control parameters like start, stop, status, restart, etc.
case "$1" in
start)
# Start daemons.
echo -n $"Starting Azkaban daemon: "
echo
daemon Azkaban
echo
;;
stop)
# Stop daemons.
echo -n $"Shutting down Azkaban: "
killproc Azkaban
echo
# Do clean-up works here like removing pid files from /var/run, etc.
;;
status)
status Azkaban
;;
restart)
$0 stop
$0 start
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment