Skip to content

Commit 3de8089

Browse files
committed
Fix discovery JSON on newer ubuntu releases. Fix #6
1 parent 6ff630e commit 3de8089

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zabbix-zimbra/zbx_zimbra.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ fork_discover() {
4747
# Return a list of running services in JSON
4848
SRVCS=$($COMMAND status | grep -v ^Host | awk '{$(NF--)=""; print}' | sed 's/^/\t{ \"{#ZIMBRASERVICE}\":\"/' | sed 's/\ $/\" },/')
4949
echo "{"
50-
echo "\t\"data\":[\n"
50+
echo -e "\t\"data\":[\n"
5151
# Remove last comma from the sting, to make a good JSON
5252
echo $(echo $SRVCS | sed 's/,\+$//')
53-
echo "\n\t]\n"
53+
echo -e "\n\t]\n"
5454
echo "}"
5555
}
5656

0 commit comments

Comments
 (0)