Skip to content

Commit

Permalink
Merge pull request #64 from blackcobra1973/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dnaeon committed Sep 2, 2014
2 parents 5f028ac + 1365028 commit 1fcab98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contrib/zabbix/externalscripts/cvpoller-zabbix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Simple wrapper script to use with Zabbix and the C client of vPoller

# A POSIX variable
Expand Down Expand Up @@ -65,4 +65,4 @@ then
fi

# Rename property as it might contain dots in the complete property name, so that 'jq' can parse it
sh -c "vpoller-cclient ${_args} 2>/dev/null" | jq -r ".result[0] | {\"property\": .[\"${_property_name}\"]}.property"
bash -c "vpoller-cclient ${_args} 2>/dev/null" | jq -r ".result[0] | {\"property\": .[\"${_property_name}\"]}.property"
6 changes: 3 additions & 3 deletions contrib/zabbix/externalscripts/vpoller-zabbix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Simple wrapper script to use with Zabbix helper

# A POSIX variable
Expand All @@ -7,7 +7,7 @@ OPTIND=1 # Reset in case getopts has been used previously in the shell.
# Initialize our own variables:
whitespace="[[:space:]]"
_vsphere=
normal=`echo $@ | grep -E "(cluster|datacenter)" | wc -l`
normal=`echo $@ | grep -E "(cluster.get|datacenter.get)" | wc -l`

if [ $normal -ne 0 ]
then
Expand Down Expand Up @@ -71,7 +71,7 @@ fi
### Excute the vpoller-client
if [ $normal -ne 0 ]
then
sh -c "vpoller-client -H vpoller.helpers.zabbix ${_args}" | awk '{print $1;}'
bash -c "vpoller-client -H vpoller.helpers.zabbix ${_args}" | awk '{print $1;}'
else
vpoller-client -H vpoller.helpers.zabbix ${_args}
fi

0 comments on commit 1fcab98

Please sign in to comment.