Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh
16151 views
1
--- contrib/dnscheck-dispatcher.sh.orig 2010-06-29 02:15:59.000000000 -0700
2
+++ contrib/dnscheck-dispatcher.sh 2012-01-15 15:32:16.000000000 -0800
3
@@ -6,45 +6,18 @@
4
5
# Add the following lines to /etc/rc.conf to enable the dnscheck-dispatcher daemon:
6
#
7
-#dnscheck_dispatcher_enable="YES"
8
-
9
-#
10
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
11
-# SET THEM IN THE /etc/rc.conf FILE
12
-#
13
-utility_enable=${dnscheck_dispatcher_enable-"NO"}
14
-utility_flags=${dnscheck_dispatcher_flags-""}
15
-utility_pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"}
16
+# dnscheck_dispatcher_enable="YES"
17
18
. /etc/rc.subr
19
20
name="dnscheck_dispatcher"
21
-rcvar=`set_rcvar`
22
-command="/usr/local/bin/dnscheck-dispatcher"
23
+rcvar=dnscheck_dispatcher_enable
24
25
-pidfile="${utility_pidfile}"
26
+load_rc_config $name
27
28
-start_cmd=dnscheck_dispatcher_start
29
-stop_cmd=dnscheck_dispatcher_stop
30
-status_cmd=dnscheck_dispatcher_status
31
-
32
-dnscheck_dispatcher_start() {
33
- /bin/echo "Starting ${name}." && \
34
- /usr/bin/nice -5 ${command} ${utility_flags} ${command_args}
35
-}
36
-
37
-
38
-dnscheck_dispatcher_stop() {
39
- /bin/echo "Stopping ${name}." && \
40
- /bin/kill -9 `cat ${utility_pidfile}` && /bin/rm ${utility_pidfile}
41
-}
42
-
43
-dnscheck_dispatcher_status() {
44
- if [ -e $utility_pidfile ]
45
- then echo "dnscheck_dispatcher is running as pid `cat ${utility_pidfile}`."
46
- else echo "dnscheck_dispatcher is not running."
47
- fi
48
-}
49
+dnscheck_dispatcher_enable=${dnscheck_dispatcher_enable-"NO"}
50
+pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"}
51
+
52
+command="%%PREFIX%%/bin/dnscheck-dispatcher"
53
54
-load_rc_config $name
55
run_rc_command "$1"
56
57