#!/bin/sh

# chkconfig: 01356 95 05
# description: Server for Plan calendars.

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

# See how we were called.
case "$1" in
  start)
	[ -f /var/lock/subsys/netplan ] && exit 1
	touch /var/lock/subsys/netplan
	echo -n "Starting networked schedule server: "
	daemon /usr/lib/netplan -v
	echo
	;;
  stop)
	[ ! -f /var/lock/subsys/netplan ] && exit 1
	echo -n "Stopping networked schedule server: "		
	killall netplan 2>/dev/null && echo -n "netplan "
	echo
	rm -f /var/lock/subsys/netplan
	;;
  status)
	status netplan
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: netplan.init {start|stop|status|restart}"
	exit 1
esac

exit 0

