This repository was archived by the owner on Jun 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 15
15
16
16
command=" /usr/bin/pdns_control list"
17
17
18
- if [ " $1 " = " autoconf" ]; then
18
+ if [[ " $1 " = " autoconf" ] ]; then
19
19
echo yes
20
20
exit 0
21
21
fi
22
22
23
- if [ " $1 " = " config" ]; then
23
+ if [[ " $1 " = " config" ] ]; then
24
24
echo ' graph_title Power DNS errors'
25
25
echo ' graph_args -l 0 --base 1000'
26
26
echo ' graph_vlabel numbers of'
@@ -41,5 +41,4 @@ if [ "$1" = "config" ]; then
41
41
exit 0
42
42
fi
43
43
44
-
45
- $command | sed ' s/=\([0-9]\+\),/.value \1\n/g' | grep corrupt' \|' servfail' \|' timedout | sed ' s/-/_/g'
44
+ ${command} | sed ' s/=\([0-9]\+\),/.value \1\n/g' | grep corrupt' \|' servfail' \|' timedout | sed ' s/-/_/g'
Original file line number Diff line number Diff line change 15
15
16
16
command=" /usr/bin/pdns_control show"
17
17
18
- if [ " $1 " = " autoconf" ]; then
18
+ if [[ " $1 " = " autoconf" ] ]; then
19
19
echo yes
20
20
exit 0
21
21
fi
22
22
23
- if [ " $1 " = " config" ]; then
23
+ if [[ " $1 " = " config" ] ]; then
24
24
echo ' graph_title Power DNS latency'
25
25
echo ' graph_args -l 0'
26
26
echo ' graph_vlabel usec'
@@ -32,7 +32,4 @@ if [ "$1" = "config" ]; then
32
32
exit 0
33
33
fi
34
34
35
-
36
-
37
-
38
- echo " latency.value $( $command latency | awk -F= ' {print $2}' ) "
35
+ echo " latency.value $( ${command} latency | awk -F= ' {print $2}' ) "
Original file line number Diff line number Diff line change 15
15
16
16
command=" /usr/bin/pdns_control show"
17
17
18
- if [ " $1 " = " autoconf" ]; then
18
+ if [[ " $1 " = " autoconf" ] ]; then
19
19
echo yes
20
20
exit 0
21
21
fi
22
22
23
- if [ " $1 " = " config" ]; then
23
+ if [[ " $1 " = " config" ] ]; then
24
24
echo ' graph_title Power DNS database queue'
25
25
echo ' graph_args -l 0'
26
26
echo ' graph_vlabel number of waiting queries'
@@ -32,5 +32,5 @@ if [ "$1" = "config" ]; then
32
32
exit 0
33
33
fi
34
34
35
- echo " qsize.value $( $command qsize-q) "
35
+ echo " qsize.value $( ${ command} qsize-q) "
36
36
Original file line number Diff line number Diff line change 15
15
16
16
command=" /usr/bin/pdns_control list"
17
17
18
- if [ " $1 " = " autoconf" ]; then
18
+ if [[ " $1 " = " autoconf" ] ]; then
19
19
echo yes
20
20
exit 0
21
21
fi
22
22
23
- if [ " $1 " = " config" ]; then
23
+ if [[ " $1 " = " config" ] ]; then
24
24
echo ' graph_title Power DNS queries'
25
25
echo ' graph_args -l 0 --base 1000'
26
26
echo ' graph_vlabel numbers of'
@@ -53,5 +53,4 @@ if [ "$1" = "config" ]; then
53
53
exit 0
54
54
fi
55
55
56
-
57
- $command | sed ' s/=\([0-9]\+\),/.value \1\n/g' | grep udp-' \|' recursing' \|' tcp | sed ' s/-/_/g'
56
+ ${command} | sed ' s/=\([0-9]\+\),/.value \1\n/g' | grep udp-' \|' recursing' \|' tcp | sed ' s/-/_/g'
You can’t perform that action at this time.
0 commit comments