#!/sbin/openrc-run
# Copyright 2021 Hyperbola Project
# Distributed under the terms of the GNU General Public License, v2 or later

description="chronyd - the lightweight network time protocol daemon"
pidfile="/run/chronyd.pid"
command="/usr/sbin/chronyd"
command_args="-d ${OPTS}"
start_stop_daemon_args="--pidfile ${pidfile}"

depend() {
	use net dns logger
}

start_pre() {
	if [ ! -f /etc/chrony.conf ] ; then
		eerror "Please create /etc/chrony.conf"
		return 1
	fi
	return 0
}
