#!/bin/sh

##
# XL Server
##

. /etc/rc.common

StartService ()
{
     if [ "${XLSERVER:=-NO-}" = "-YES-" ]; then
		cd ++XLHOMEDIR++
		PATH=$PATH:++XLHOMEDIR++/xlscript/bin
		export PATH
	        xl gbserver.xl / start
     fi
}

StopService ()
{
	cd ++XLHOMEDIR++
	PATH=$PATH:++XLHOMEDIR++/xlscript/bin
	export PATH
	xl gbserver.xl / stop
         return 0
}

RestartService ()
{
         StopService
         StartService
}

RunService "$1"

