#!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/htpdate/files/htpdate.init,v 1.4 2011/10/09 16:19:16 vapier Exp $ depend() { need net use dns logger } checkconfig() { if [ -z "${SERVERS}" ] ; then eerror "You need to set at least one http server to use in /etc/conf.d/htpdate" return 1 fi } start() { checkconfig || return 1 ebegin "Starting htpdate" htpdate ${HTPDATE_OPTS} ${PROXY} ${SERVERS} eend $? } stop() { ebegin "Stopping htpdate" start-stop-daemon --stop --quiet --pidfile /var/run/htpdate.pid eend $? }