FreeBSD Bugzilla – Attachment 225536 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]
dns/knot-resolver: replacement for rc.d/kresd (final version)
kresd (text/plain), 1.47 KB, created by
Chris Hutchinson
on 2021-06-04 06:06:45 UTC
(
hide
)
Description:
dns/knot-resolver: replacement for rc.d/kresd (final version)
Filename:
MIME Type:
Creator:
Chris Hutchinson
Created:
2021-06-04 06:06:45 UTC
Size:
1.47 KB
patch
obsolete
>#!/bin/sh ># ># $FreeBSD: head/dns/knot-resolver/files/kresd.in 542054 2020-07-11 20:57:41Z pi $ ># ># PROVIDE: kresd ># REQUIRE: NETWORKING ># BEFORE: SERVERS ># KEYWORD: shutdown ># ># Add the following lines to /etc/rc.conf to enable knot-resolver: ># ># kresd_enable="YES": Set to YES to enable kresd. ># Set to NO by default. ># kresd_config="": Set to /usr/local/etc/knot-resolver/kresd.conf ># by default. ># > >. /etc/rc.subr > >name=kresd >rcvar=kresd_enable > >load_rc_config ${name} > >kresd_enable=${kresd_enable:-"NO"} >kresd_config=${kresd_config:-"/usr/local/etc/knot-resolver/${name}.conf"} >kresd_rundir="/var/run/kresd" > >pidfile="/var/run/kresd/${name}.pid" >procname="/usr/local/sbin/${name}" >required_files="${kresd_config}" >kuser=${name} >kgroup=$name} > >start_cmd=kresd_start >stop_cmd=kresd_stop > >command="/usr/sbin/daemon" >command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}" > >kresd_prestart() >{ > if [ ! -d /var/run/${name} ]; then > install -d -o ${kuser} -g ${kgroup} /var/run/${name} > fi > if [ -f "${pidfile}" ]; then > echo "${name} is already running" > ${stop_cmd} > fi >} >kresd_start() { > if [ ! -f "${pidfile}" ]; then > echo "starting ${name}..." && \ > ${command} ${command_args} > printf "\n${name} started.\n" > 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" > done > 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 Raw
Actions:
View
Attachments on
bug 256221
:
225535
|
225536
|
225548
|
225552
|
225620
|
225993
|
226234