mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
asterisk_inuse: fix plugin to use asterisk command from PATH and fix a whitespace issue
This commit is contained in:
parent
446de9a689
commit
137cbf74b6
1 changed files with 6 additions and 6 deletions
|
@ -7,8 +7,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -x /usr/local/sbin/asterisk ]; then
|
if [ which asterisk ]; then
|
||||||
/usr/local/sbin/asterisk -rx 'sip show inuse' > /dev/null
|
asterisk -rx 'sip show inuse' > /dev/null
|
||||||
if [ $? = "0" ]; then
|
if [ $? = "0" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -40,8 +40,8 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INUSE=`/usr/local/sbin/asterisk -rx 'sip show inuse' | grep -v "0/0" | grep -v " 0 " | grep -v " name" | wc -l`
|
INUSE=`asterisk -rx 'sip show inuse' | grep -v "0/0" | grep -v " 0 " | grep -v " name" | wc -l`
|
||||||
CONN=`/usr/local/sbin/asterisk -rx 'sip show peers' | grep OK | wc -l`
|
CONN=`asterisk -rx 'sip show peers' | grep OK | wc -l`
|
||||||
|
|
||||||
if [ "$INUSE" -ge "1" ]; then
|
if [ "$INUSE" -ge "1" ]; then
|
||||||
echo "inuse.value "$INUSE
|
echo "inuse.value "$INUSE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue