Update install-dsmon.sh
This commit is contained in:
@@ -149,9 +149,9 @@ if [ "${SET_SERVERMONID}" = "new" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');"
|
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}';"
|
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 -en "${idsCL[LightGreen]}Server successfully added, it was given ID# "
|
||||||
echo -e ${SET_SERVERMONID//id
|
echo -e ${SET_SERVERMONID//id
|
||||||
|
|||||||
Reference in New Issue
Block a user