403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/dns/knot-resolver/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/dns/knot-resolver/files/kresd.in
#!/bin/sh

# 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 %%ETCDIR%%/kresd.conf
#			by default.
#

. /etc/rc.subr

name=kresd
rcvar=kresd_enable

load_rc_config ${name}

# set defaults
kresd_enable=${kresd_enable:-"NO"}
kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"}
kresd_user="%%USERS%%"
kresd_group="%%GROUPS%%"
kresd_rundir="/var/run/${name}"

pidfile="${kresd_rundir}/${name}.pid"
procname="%%PREFIX%%/sbin/${name}"
required_files="${kresd_config}"

start_cmd="${name}_start"
stop_cmd="${name}_stop"

command="/usr/sbin/daemon"
command_args="-c -f -S -r -P ${pidfile} -T ${name} -- ${procname} -c ${kresd_config} -n -q ${kresd_rundir}"

kresd_start() {
	if [ ! -d /var/run/${name} ]; then
		install -d -o ${kresd_user} -g ${kresd_group} -m 700 ${kresd_rundir}
	fi
	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
	}

kresd_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
	}

run_rc_command "$1"

Youez - 2016 - github.com/yon3zu
LinuXploit