FreeBSD Bugzilla – Attachment 248987 Details for
Bug 277540
dns/knot-resolver: fixing rc scripts krescachegc and kresd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for dns/knot-resolver/files kresd.in and krescachegc.in
knot-resolver-5.7.1.diff (text/plain), 2.00 KB, created by
Michael Grimm
on 2024-03-06 20:43:37 UTC
(
hide
)
Description:
patch for dns/knot-resolver/files kresd.in and krescachegc.in
Filename:
MIME Type:
Creator:
Michael Grimm
Created:
2024-03-06 20:43:37 UTC
Size:
2.00 KB
patch
obsolete
>diff --git a/dns/knot-resolver/files/krescachegc.in b/dns/knot-resolver/files/krescachegc.in >index 163d4101df9e..8fd90a76fd00 100644 >--- a/dns/knot-resolver/files/krescachegc.in >+++ b/dns/knot-resolver/files/krescachegc.in >@@ -22,11 +22,48 @@ load_rc_config ${name} > # set defaults > krescachegc_enable=${krescachegc_enable:-"NO"} > krescachegc_millis=${krescachegc_millis:-"1000"} >+krescachegc_cache=${krescachegc_cache:-"%%RUNDIR%%"} > > pidfile="%%RUNDIR%%/${name}.pid" > procname="%%PREFIX%%/sbin/kres-cache-gc" > >+start_cmd="${name}_start" >+stop_cmd="${name}_stop" >+status_cmd="${name}_status" >+ > command=/usr/sbin/daemon >-command_args="-c -f -S -r -P ${pidfile} -T ${name} -u %%USERS%% -- ${procname} -d ${krescachegc_millis}" >+command_args="-c -f -S -r -P ${pidfile} -T ${name} -u root -- ${procname} -c ${krescachegc_cache} -d ${krescachegc_millis}" >+ >+krescachegc_start() { >+ if [ ! -f "${pidfile}" ]; then >+ echo "starting ${name}..." && \ >+ ${command} ${command_args} >+ echo -e "\e[1A\e[K${name} started." >+ else >+ echo "${name} already seems to be running." >+ fi >+} >+ >+krescachegc_stop() { >+ if [ -f "${pidfile}" ]; then >+ echo "stopping ${name}..." && \ >+ for pid in `ps waux | grep ${procname} | grep daemon | awk '{print $2}'`; do \ >+ kill -TERM $pid >+ done >+ echo -e "\e[1A\e[K${name} stopped." >+ else >+ echo "${name} seems to be not running." >+ fi >+} >+ >+krescachegc_status() { >+ if [ -e "${pidfile}" ]; then >+ echo "${name} is running on pid $(cat $pidfile)." >+ return 1 >+ else >+ echo "${name} is not running." >+ return 0 >+ fi >+} > > run_rc_command "$1" >diff --git a/dns/knot-resolver/files/kresd.in b/dns/knot-resolver/files/kresd.in >index 9cc3d309a43f..5a3e0f8f1532 100644 >--- a/dns/knot-resolver/files/kresd.in >+++ b/dns/knot-resolver/files/kresd.in >@@ -33,6 +33,7 @@ required_files="${kresd_config}" > > start_cmd="${name}_start" > stop_cmd="${name}_stop" >+status_cmd="${name}_status" > > command="/usr/sbin/daemon" > command_args="-c -f -S -r -P ${pidfile} -T ${name} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 277540
: 248987