aboutsummaryrefslogtreecommitdiff
path: root/dns/knot/files/knot.in
diff options
context:
space:
mode:
Diffstat (limited to 'dns/knot/files/knot.in')
-rw-r--r--dns/knot/files/knot.in58
1 files changed, 0 insertions, 58 deletions
diff --git a/dns/knot/files/knot.in b/dns/knot/files/knot.in
deleted file mode 100644
index 3ea4219a11af..000000000000
--- a/dns/knot/files/knot.in
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: knot
-# REQUIRE: SERVERS cleanvar
-# KEYWORD: shutdown
-#
-# Add the following lines to /etc/rc.conf to enable knot:
-#
-# knot_enable="YES": Set to NO by default.
-# Set it to YES to enable knot.
-# knot_config="": Set to /usr/local/etc/knot/knot.conf
-# by default.
-
-. /etc/rc.subr
-
-name=knot
-rcvar=knot_enable
-
-load_rc_config ${name}
-
-: ${knot_enable:=NO}
-: ${knot_config="%%PREFIX%%/etc/knot/knot.conf"}
-
-command=%%PREFIX%%/sbin/knotd
-command_args="-c ${knot_config} -d"
-control=%%PREFIX%%/sbin/knotc
-pidfile=/var/run/knot/knot.pid
-
-required_files=${knot_config}
-
-extra_commands=reload
-reload_cmd="${name}_reload"
-start_precmd="${name}_prestart"
-
-knot_prestart()
-{
- if [ ! -d /var/run/knot ]; then
- install -d -o %%USERS%% -g %%GROUPS%% /var/run/knot
- fi
- if [ ! -d /var/db/knot ]; then
- install -d -o %%USERS%% -g %%GROUPS%% /var/db/knot
- fi
- grep -v '#' ${knot_config} | grep -q -E 'knot.knot;|bind.bind;'
- if [ $? -ne 0 ]; then
- echo "Notice: not running as uid.gid knot.knot or bind.bind"
- fi
- ${control} -c ${knot_config} checkconf
-}
-
-knot_reload()
-{
- echo "Reloading ${name}."
- ${control} -c ${knot_config} reload
-}
-
-run_rc_command "$1"