#!/bin/sh
#
# chkconfig: - 60 60
# description: MARS is a NetWare compatible file and printer server. It \
#              lets you use a Linux machine as a file and print server for \
#              NetWare based clients using NetWare's native IPX protocol suite.

# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/sbin/nwserv ] || exit 0
# See how we were called.
case "$1" in
  start)
	echo -n "Starting NetWare emulator-server: "
	touch /var/lock/subsys/mars_nwe
	daemon nwserv
	echo
	;;
  stop)
	echo -n "Stopping NetWare emulator-server: "
	killall -QUIT nwserv
	rm -f /var/lock/subsys/mars_nwe
	echo
	;;
  status)
	status nwserv
	;;
  restart)
	killall -HUP nwserv
	;;
  *)
	echo "Usage: mars-nwe.init {start|stop|status|restart}"
	exit 1
esac

exit 0

