From 0d61de9938a6cfe13cf234986f476f0e210e257b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Jun 2025 20:01:59 -0500 Subject: [PATCH] Update install-dsmon.sh --- install-dsmon.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install-dsmon.sh b/install-dsmon.sh index a205dac..9e3ad9e 100755 --- a/install-dsmon.sh +++ b/install-dsmon.sh @@ -28,10 +28,10 @@ fi RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) if [[ "${RNIP}" == "10.6.1"* ]]; then - mysqlcmd=mysql + mysqlcmd="mysql" do_with_root $APTFUNC install wget curl git mailutils bc mysql-client-8.0 else - mysqlcmd=mariadb + mysqlcmd="mariadb --skip-ssl" do_with_root $APTFUNC install wget curl git mailutils bc mariadb-client fi @@ -164,9 +164,9 @@ if [ "${SET_SERVERMONID}" = "new" ]; then if [ "${mysqlip}" != "" ]; then QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');" - ${mysqlcmd} --skip-ssl -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}" + ${mysqlcmd} -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}" QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';" - SET_SERVERMONID=`${mysqlcmd} --skip-ssl -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}"` + SET_SERVERMONID=`${mysqlcmd} -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}"` else echo -e "${idsCL[Red]}Could not connect to MySQL${idsCL[Default]}" fi