#! /bin/sh
#
# chronyd: - 60 20
# description: Chrony is a implementation of NTP that support disconnected
#              operation

# Get config.
. /etc/sysconfig/network

# Get functions
. /etc/rc.d/init.d/functions

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

# See how we were called.
case "$1" in
  start)
	echo -n "Starting chrony services: "
	daemon chronyd

	echo
	touch /var/lock/subsys/rwhod
	;;
  stop)
	echo -n "Stopping chrony services: "
	killproc chronyd

	echo
	rm -f /var/lock/subsys/rwhod
	;;
  status)
	status chronyd
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: chronyd {start|stop|status|restart}"
	exit 1
esac

exit 0
