diff --git a/system/dkimpy-milter.openrc.in b/system/dkimpy-milter.openrc.in index cd12b11..03358cb 100644 --- a/system/dkimpy-milter.openrc.in +++ b/system/dkimpy-milter.openrc.in @@ -7,48 +7,9 @@ required_files="${CONFFILE}" command="@SBINDIR@/dkimpy-milter" pidfile="@RUNSTATEDIR@/${RC_SVCNAME}.pid" -command_args="-P ${pidfile} -x ${CONFFILE}" -extra_commands="checkconfig" +command_args="-P ${pidfile} ${CONFFILE}" depend() { use dns logger net before mta } - -checkconfig() { - # - # The dkimpy-milter.conf man page says, - # - # For parameters that are Boolean in nature, only the first byte - # of the value is processed... For negative values, the following - # are accepted: "F", "f", "N", "n", "0".' - # - if @GREP@ '^[[:space:]]*Background[[:space:]]\+[FfNn0]' "${CONFFILE}" \ - >/dev/null 2>&1; then - eend 1 "${RC_SVCNAME} cannot run in the foreground!" - fi - if ! "${command}" -n "${command_args}"; then - eend 1 "${RC_SVCNAME} configuration check failed" - fi -} - -start_pre() { - # If this isn't a restart, make sure that the user's config isn't - # busted before we try to start the daemon (this will produce - # better error messages than if we just try to start it blindly). - # - # If, on the other hand, this *is* a restart, then the stop_pre - # action will have ensured that the config is usable and we don't - # need to do that again. - if [ "${RC_CMD}" != "restart" ]; then - checkconfig || return $? - fi -} - -stop_pre() { - # If this is a restart, check to make sure the user's config - # isn't busted before we stop the running daemon. - if [ "${RC_CMD}" = "restart" ]; then - checkconfig || return $? - fi -}