#!/bin/bash
#
### BEGIN INIT INFO
# Provides:		lxhastonith
# Required-Start:    $syslog $time $remote_fs
# Required-Stop:     $syslog $time $remote_fs
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
### END INIT INFO
#
# Author: Song yonghong <yhsong@linx-info.com>
#

daemon=/sbin/lxhasrv

# Sanity checks
[ -x $daemon ] || exit 1

# Source function library & LSB routines
. /lib/lsb/init-functions

# For convenience
processname=lxhasrv

# See how we are called
case "$1" in
	start)
		start-stop-daemon --start  --quiet --oknodo -g sysadmin -c sysadmin --exec $daemon
		;;
	stop)
		/bin/kill -9 `pidof lxhasrv`
		;;
	*)
		echo $"Usage: $0 {start|stop}"
		;;
esac
