This commit is contained in:
2024-02-19 22:06:13 -06:00
parent 02262c16ef
commit a01ba341fe
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS=2.3.26-02192024
VERS=2.3.30-02192024
DS_FOLDER=/opt/idssys/dsmon
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs

View File

@@ -456,7 +456,7 @@ GETCRONTABS(){
host_ip[${hostid}]=$(echo $hostip | cut -d ";" -f1)
host_name[${hostid}]=$hostname
fi
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -P 6033 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
if [ "${rtpsswd}" == "" ]; then
read -p "Enter the password for the 'nm_crontab_user' account on MySQL-Manager: " rtpsswd
@@ -494,7 +494,7 @@ GETCRONTAB(){
# echo -e "${SERVERMON_ID}) ${host} : ${hostname}\nmysqlip=${mysqlip}\n"
crontab -l | sshpass -p${1} ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > ${DS_CRONTAB_FOLDER}/${host}.crontab"
fi
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "SELECT host,hostname FROM servermonitor.hosts WHERE id=${SERVERMON_ID}")
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -P 6033 -u sysmoninsert -e "SELECT host,hostname FROM servermonitor.hosts WHERE id=${SERVERMON_ID}")
fi
# [ "${nmip}" != "" ] && crontab -l | sshpass -p${1} ssh -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > ${DS_CRONTAB_FOLDER}/${hostname}.crontab"