Update install-dsmon.sh

This commit is contained in:
2023-07-06 20:17:22 -05:00
parent f33ced8382
commit 0847dbeeca

View File

@@ -149,9 +149,9 @@ if [ "${SET_SERVERMONID}" = "new" ]; then
fi
QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');"
mysql -h ${mysqlip} -P 3306 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"
mysql -h ${mysqlip} --user=sysmoninsert --password=sysmoninsert -e "${QRY}"
QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';"
SET_SERVERMONID=`mysql -h ${mysqlip} -P 3306 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"`
SET_SERVERMONID=`mysql -h ${mysqlip} --user=sysmoninsert --password=sysmoninsert -e "${QRY}"`
echo -en "${idsCL[LightGreen]}Server successfully added, it was given ID# "
echo -e ${SET_SERVERMONID//id