FreeBSD Bugzilla – Attachment 225620 Details for
Bug 256221
dns/knot-resolver: the kresd init script won't stop the service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
git diff for dns:/knot-resolver (version 2)
dns_knot-resolver-02.diff (text/plain), 1.81 KB, created by
Chris Hutchinson
on 2021-06-07 05:07:05 UTC
(
hide
)
Description:
git diff for dns:/knot-resolver (version 2)
Filename:
MIME Type:
Creator:
Chris Hutchinson
Created:
2021-06-07 05:07:05 UTC
Size:
1.81 KB
patch
obsolete
>diff --git a/dns/knot-resolver/files/kresd.in b/dns/knot-resolver/files/kresd.in >index 1aa44de36514..646afacdee77 100644 >--- a/dns/knot-resolver/files/kresd.in >+++ b/dns/knot-resolver/files/kresd.in >@@ -20,16 +20,56 @@ rcvar=kresd_enable > > load_rc_config ${name} > >-# set defaults >- > kresd_enable=${kresd_enable:-"NO"} >-kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"} >+kresd_config=${kresd_config:-"/usr/local/etc/knot-resolver/${name}.conf"} >+kresd_rundir="/var/run/kresd" > >-pidfile="%%RUNDIR%%/${name}.pid" >-procname="%%PREFIX%%/sbin/${name}" >+pidfile="/var/run/kresd/${name}.pid" >+procname="/usr/local/sbin/${name}" > required_files="${kresd_config}" >+kuser=${name} >+kgroup=$name} >+ >+restart_cmd="${name}_restart" >+start_cmd="${name}_start" >+stop_cmd="${name}_stop" > > command="/usr/sbin/daemon" >-command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q %%RUNDIR%%" >+command_args="-c -f -S -r -P ${pidfile} -T ${name} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}" >+ >+kresd_restart() { >+ if [ -f "${pidfile}" ]; then >+ printf "restarting ${name}...\n\n" >+ run_rc_command stop >+ run_rc_command start >+ else >+ printf "Hmm... ${name} isn't running.\n\n" >+ run_rc_command start >+ fi >+} >+kresd_start() >+{ >+ if [ ! -d /var/run/${name} ]; then >+ install -d -o ${kuser} -g ${kgroup} /var/run/${name} >+ elif [ ! -f "${pidfile}" ]; then >+ echo "starting ${name}..." && \ >+ ${command} ${command_args} >+ printf "\n${name} started.\n" >+ else >+ echo "Nothing to do. ${name} is already running." >+ fi >+} >+kresd_stop() { >+ if [ -f "${pidfile}" ]; then >+ echo "stopping ${name}..." && \ >+ for pid in `ps waux | grep ${name} | grep daemon | awk '{print $2}'`; \ >+ do \ >+ kill -TERM $pid >+ printf "\n${name} stopped.\n\n" >+ done >+ else >+ echo "Nothing to do. ${name} isn't running." >+ fi >+} > > run_rc_command "$1"
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
Flags:
freebsd
:
maintainer-approval-
Actions:
View
|
Diff
Attachments on
bug 256221
:
225535
|
225536
|
225548
|
225552
| 225620 |
225993
|
226234