This commit is contained in:
2025-06-01 17:14:06 -05:00
parent 9039107d82
commit 985eb7cb45
2 changed files with 24 additions and 16 deletions

View File

@@ -1,21 +1,29 @@
#!/usr/bin/env bash
VERS=2.3.46-04032025
VERS=2.4.1-06012025
DS_FOLDER=/opt/idssys/dsmon
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs
noheader=" gettsip-node get-crontabs get-crontab update report updatenodes runcmd "
[ "$(ip route | awk '/default/ { print $5 }')" == "link" ] && RNIP=$(ip addr show $(ip route | awk '/1 dev eth0/ { print $5; exit }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) ||
RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
if [ "${TAILSCALE}" == "true" ]; then
nmip=${NM_NODEMANAGER_TS}
mysqlip=100.100.5.6
mysql_conn="-h 100.100.5.6 -P 3307"
elif [ "${NM_NODEMANAGER}" != "" ]; then
nmip=${NM_NODEMANAGER}
mysqlip=${NM_SINGLESRVR_IP['MYSQL']}
if [[ "${RNIP}" == "10.6.1"* ]]; then
mysql_conn="-h ${NM_SINGLESRVR_IP['MYSQL']}"
else
mysql_conn="-h ${NM_SINGLESRVR_IP['MYSQL']} -P 3307"
fi
else
nmip=10.10.10.60
mysqlip=10.10.1.50
mysql_conn=10.10.1.50
mysql_conn="-h 10.10.1.50 -P 3307"
fi
SENDNOTICE(){