Fix JSON syntax error in disco_smart when several SMART capable drives are present

tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 12 years ago
parent 96d0cefd38
commit 79c3a90cf0
  1. 2
      zabbix_scripts/disco_smart_sudo

@ -7,7 +7,7 @@ for DISK in $(smartctl --scan-open | cut -d' ' -f1); do
DISK=$(echo $DISK | sed -e 's|/|\\/|g') DISK=$(echo $DISK | sed -e 's|/|\\/|g')
echo -e "\t{\n" echo -e "\t{\n"
echo -e "\t\t\"{#SMARTDRIVE}\":\"$DISK\"" echo -e "\t\t\"{#SMARTDRIVE}\":\"$DISK\""
echo -e "\t}" echo -e "\t},"
fi fi
done done
echo -e "\n\t]\n}\n" echo -e "\n\t]\n}\n"

Loading…
Cancel
Save