#!/bin/ksh
#
# $OpenBSD: amd,v 1.9 2018/01/11 21:09:26 rpe Exp $

daemon="/usr/sbin/amd"

. /etc/rc.d/rc.subr

pexp="${daemon}.*"
rc_reload=NO
rc_stop=NO

rc_pre() {
	[[ -e ${amd_master} ]] || return 1
	daemon_flags="${daemon_flags} $(print -rn -- $(< ${amd_master}))"
}

rc_start() {
	${rcexec} "cd /etc/amd; ${daemon} ${daemon_flags}"
}

rc_cmd $1
