From 5d038a444a3187093fe185fc0f1ebd06596a6cf5 Mon Sep 17 00:00:00 2001 From: Nuno Teixeira Date: Mon, 22 Jan 2024 08:10:35 +0000 Subject: [PATCH] dns/blocky: Enable logging in rc script - While here, move pkg-plist to PLIST_FILES PR: 276499 Reported by: rodrigo Pull Request: https://github.com/freebsd/freebsd-ports/pull/187 --- dns/blocky/Makefile | 4 ++++ dns/blocky/files/blocky.in | 3 ++- dns/blocky/pkg-plist | 2 -- 3 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 dns/blocky/pkg-plist diff --git a/dns/blocky/Makefile b/dns/blocky/Makefile index 45cac4b303ea..b69d19541e74 100644 --- a/dns/blocky/Makefile +++ b/dns/blocky/Makefile @@ -1,6 +1,7 @@ PORTNAME= blocky DISTVERSIONPREFIX= v DISTVERSION= 0.23 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod DISTFILES= go.mod:gomod @@ -26,6 +27,9 @@ GO_BUILDFLAGS= -ldflags "-w -s \ SUB_FILES= pkg-message +PLIST_FILES= "@sample etc/blocky-config.yml.sample" \ + sbin/blocky + post-install: ${INSTALL_DATA} ${FILESDIR}/blocky-config.yml.sample ${STAGEDIR}${PREFIX}/etc/blocky-config.yml.sample diff --git a/dns/blocky/files/blocky.in b/dns/blocky/files/blocky.in index 2b625f8be55d..13fb9fb0c13f 100644 --- a/dns/blocky/files/blocky.in +++ b/dns/blocky/files/blocky.in @@ -34,12 +34,13 @@ if [ -n "${blocky_user}" ] && [ -z "${blocky_group}" ]; then blocky_group=$(id -gn "${blocky_user}") fi +logfile="/var/log/${name}.log" pidfile="/var/run/${name}.pid" blocky_path="%%PREFIX%%/sbin/blocky" command="/usr/sbin/daemon" procname="/usr/local/sbin/blocky" -command_args="-c -f -p ${pidfile} ${blocky_path} \ +command_args="-c -f -o ${logfile} -p ${pidfile} ${blocky_path} \ -c ${blocky_config} ${blocky_flags}" start_precmd="blocky_precmd" diff --git a/dns/blocky/pkg-plist b/dns/blocky/pkg-plist deleted file mode 100644 index 55ea60866bc2..000000000000 --- a/dns/blocky/pkg-plist +++ /dev/null @@ -1,2 +0,0 @@ -@sample etc/blocky-config.yml.sample -sbin/blocky