#!/bin/sh
#
# rslinux       This shell script takes care of starting and stopping
#               RSLinux
#
# chkconfig: 2345 81 31
# description: RSLinux 1.0.1 Daemon
# processname: RSLinux

REGSRV_HOME=/usr/sbin

if [ ! -f $REGSRV_HOME/RSLinux ]
then
    echo "RSLinux startup: cannot start"
    exit
fi

case "$1" in
  start)
	# Start daemons.

	echo -n "Starting RSLinux: "
	su -c "sh $REGSRV_HOME/K255megadev" ## run the shell first
	su -c "$REGSRV_HOME/RSLinux" >/dev/null 2>&1
	;;
  stop)
	# Stop daemons.

	echo -n "Shutting down RSLinux: "
	su -c "$REGSRV_HOME/StopServer -stop"
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: rslinux {start|stop|restart}"
	exit 1
esac

exit

