| #!/sbin/runscript |
| # Copyright 1999-2006 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.3 2006/08/24 02:23:18 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 $? |
| } |