#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 depend() { need net use dns logger } checkconfig() { if [ ! -f /etc/ntpd.conf ] ; then eerror "Could not find /etc/ntpd.conf!" return 1 fi return 0 } start() { checkconfig || return $? ebegin "Starting ntpd" start-stop-daemon --start --exec /usr/sbin/ntpd eend $? "Failed to start openntpd" } stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --name ntpd eend $? "Failed to stop openntpd" rm -f /var/run/ntpd.pid }