Skip to content

Instantly share code, notes, and snippets.

@ryoppy
Created August 14, 2013 04:22
Show Gist options
  • Save ryoppy/6227986 to your computer and use it in GitHub Desktop.
Save ryoppy/6227986 to your computer and use it in GitHub Desktop.
/etc/init.d/hbase-standalone
#!/bin/sh
#
# hbase - this script starts and stops the hbase-standalone daemon
#
# chkconfig: - 85 15
# description: hbase-standalone daemon
# processname: hbase-standalone
# Source function library.
. /etc/rc.d/init.d/functions
# JAVA_HOME
. /etc/profile.d/export.sh
lockfile=/var/lock/subsys/hbase
start() {
echo -n $"Starting $prog: "
/usr/local/src/hbase/hbase-0.94.10/bin/start-hbase.sh
retval=$?
return $retval
}
stop() {
echo -n $"Stopping $prog: "
/usr/local/src/hbase/hbase-0.94.10/bin/stop-hbase.sh
retval=$?
return $retval
}
restart() {
stop
start
}
case "$1" in
start)
$1
;;
stop)
$1
;;
restart)
$1
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 2
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment