diff --git a/dns/coredns/Makefile b/dns/coredns/Makefile index 2e42a4c7c9cd..5cf6341bf856 100644 --- a/dns/coredns/Makefile +++ b/dns/coredns/Makefile @@ -1,27 +1,28 @@ PORTNAME= coredns DISTVERSIONPREFIX= v DISTVERSION= 1.12.2 +PORTREVISION= 1 CATEGORIES= dns MAINTAINER= yuri@FreeBSD.org COMMENT= DNS server that chains plugins WWW= https://coredns.io \ https://github.com/coredns/coredns LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:1.23,modules GO_MODULE= github.com/${PORTNAME}/${PORTNAME} USE_RC_SUBR= ${PORTNAME} PORTSCOUT= limit:^[0-9]*\.[0-9]*\.[0-9]*$$ # otherwise it picks up the deleted tag v011 post-install: .for n in 1 5 7 ${INSTALL_MAN} ${WRKSRC}/man/*.${n} ${STAGEDIR}${PREFIX}/share/man/man${n} .endfor .include diff --git a/dns/coredns/files/coredns.in b/dns/coredns/files/coredns.in index fb5af7605464..b0a422fc3b5b 100644 --- a/dns/coredns/files/coredns.in +++ b/dns/coredns/files/coredns.in @@ -1,44 +1,45 @@ #!/bin/sh # PROVIDE: coredns # REQUIRE: DAEMON NETWORKING # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local, /etc/rc.conf or # /etc/rc.conf.d/coredns to enable this service: # # coredns_enable (bool): Set to NO by default. # Set it to "YES" to enable coredns. # coredns_config (str): Set to $PREFIX/etc/coredns/Corefile by default. # Path to configuration file. # coredns_cpu_cap (str): Set to "100" by default. # CPU cap. # coredns_listen_port (str): Set to "53" by default. # Port to bind to. . /etc/rc.subr name=coredns rcvar=coredns_enable start_precmd="${name}_precmd" load_rc_config $name : ${coredns_enable:="NO"} : ${coredns_config:="%%PREFIX%%/etc/coredns/Corefile"} : ${coredns_listen_port:="53"} pidfile="/var/run/${name}.pid" +logfile="/var/log/${name}.log" command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/${name}" coredns_args="-conf ${coredns_config} -dns.port ${coredns_listen_port}" -command_args="-S -m 3 -s "info" -l "daemon" -p ${pidfile} /usr/bin/env ${procname} ${coredns_args}" +command_args="-o ${logfile} -m 3 -s "info" -l "daemon" -p ${pidfile} /usr/bin/env ${procname} ${coredns_args}" coredns_precmd() { /usr/bin/install -d -m 0755 %%PREFIX%%/etc/coredns && \ cfg_dir=$(dirname "${coredns_config}") && cd "$cfg_dir" } run_rc_command "$1"