summaryrefslogtreecommitdiff
path: root/dns/knot-resolver/files/krescachegc.in
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2020-07-11 20:57:41 +0000
committerKurt Jaeger <pi@FreeBSD.org>2020-07-11 20:57:41 +0000
commit542f7ceaf52d496aa6d5c52f614feeac4ec5dc3c (patch)
tree2b00b6c92e62824f22774c6eba695fa07867835a /dns/knot-resolver/files/krescachegc.in
parent6f10b9e8b32b7ee9e28585486b925e4536fdc78d (diff)
downloadfreebsd-ports-542f7ceaf52d496aa6d5c52f614feeac4ec5dc3c.zip
dns/knot-resolver: update 5.1.1 -> 5.1.2
PR: 247699 Submitted by: Leo Vandewoestijne <freebsd@dns.company> (maintainer) andrew@tao11.riddles.org.uk Relnotes: https://www.knot-resolver.cz/2020-07-01-knot-resolver-5.1.2.html
Diffstat (limited to 'dns/knot-resolver/files/krescachegc.in')
-rw-r--r--dns/knot-resolver/files/krescachegc.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/dns/knot-resolver/files/krescachegc.in b/dns/knot-resolver/files/krescachegc.in
new file mode 100644
index 000000000000..435303b24203
--- /dev/null
+++ b/dns/knot-resolver/files/krescachegc.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: krescachegc
+# REQUIRE: SERVERS cleanvar
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable knot-resolver:
+#
+# krescachegc_enable="YES": Set to YES to enable krescachegc.
+# Set to NO by default.
+# krescachegc_millis="1000": Set to garbage collect interval in milliseconds
+# Set to 1000 by default.
+#
+
+. /etc/rc.subr
+
+name=krescachegc
+rcvar=krescachegc_enable
+
+load_rc_config ${name}
+
+# set defaults
+
+krescachegc_enable=${krescachegc_enable:-"NO"}
+krescachegc_millis=${krescachegc_millis:-"1000"}
+
+pidfile="%%RUNDIR%%/${name}.pid"
+procname="%%PREFIX%%/sbin/kres-cache-gc"
+
+command=/usr/sbin/daemon
+command_args="-c -f -r -P ${pidfile} -u %%USERS%% -- ${procname} -c %%RUNDIR%% -d ${krescachegc_millis}"
+
+run_rc_command "$1"