Projet

Général

Profil

Révision a86de787

IDa86de7871ac2d31ac1f6a917b3149deb92556f51
Parent f9426dac
Enfant 6cc95f20

Ajouté par Bas Couwenberg il y a environ 8 ans

Use exit status 0 for autoconf, provide reason for 'no' answer.

Voir les différences:

plugins/pdns/pdns_rec_cache
9 9
#    echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
10 10
#    echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
11 11

  
12
rec_control="/usr/bin/rec_control"
13

  
12 14
if [ "$1" = "autoconf" ]; then
13
	if [ -e /usr/bin/rec_control ]; then
15
	if [ -e "$rec_control" ]; then
14 16
		echo yes
15 17
		exit 0
16 18
	else
17
		echo no
18
		exit 1
19
		echo "no (missing $rec_control)"
20
		exit 0
19 21
	fi
20 22
fi
21 23

  
22
RESENDS="$(rec_control get cache-resends)"
24
RESENDS="$($rec_control get cache-resends)"
23 25
ISRESENDS=""
24 26
[ "$RESENDS" != "UNKNOWN" ] && ISRESENDS="resends"
25 27

  
......
53 55
	exit 0
54 56
fi
55 57

  
56
echo hits.value "$(rec_control get cache-hits)"
57
echo misses.value "$(rec_control get cache-misses)"
58
[ "$RESENDS" != "UNKNOWN" ] && echo resends.value "$(rec_control get cache-resends)"
58
echo hits.value "$($rec_control get cache-hits)"
59
echo misses.value "$($rec_control get cache-misses)"
60
[ "$RESENDS" != "UNKNOWN" ] && echo resends.value "$($rec_control get cache-resends)"
59 61

  
60 62
exit 0

Formats disponibles : Unified diff