#!/bin/sh

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting emp4 server: "
	/usr/games/emp4/bin/emp_server	
	echo "emp_server"
	touch /var/lock/subsys/emp4
	;;
  stop)
	echo -n "Shutting down emp4 server: "
	killproc emp_server
	rm -f /var/lock/subsys/emp4
	echo ""
	;;
  status)
	status emp_server
	;;
  restart)
	echo -n "Restarting emp4 server: "
	$0 stop
	$0 start
	echo "done."
	;;
  *)
	echo "Usage: emp4 {start|stop|restart|status}"
	exit 1
esac

