From f6ec7524f4100ad54853f11266c24c76c9a80f5e Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Mar 2025 22:25:39 -0500 Subject: [PATCH] Update defaults.inc --- defaults.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/defaults.inc b/defaults.inc index d6a1be78..e2147edc 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,12 +1,13 @@ #!/usr/bin/env bash -VERS='2.8.24-03092025' +VERS='2.8.25-03102025' noheader=' update service dailytemp confsync -r -report test ' HC_CW=60 PRI_WIDTH=75 ESXI_DEFAULT_EXHAUST_MIN=85 +IP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) NM_FOLDER='/opt/idssys/nodemgmt' NM_TMPFOLDER=${NM_FOLDER}/.tmp @@ -14,8 +15,8 @@ NM_TMPFOLDER=${NM_FOLDER}/.tmp PW_FOLDER='/opt/idssys/powerwall' PW_INCFOLDER=${PW_FOLDER}/inc -PW_LOGFOLDER=${PW_FOLDER}/logs -PW_LOGARCHIVE=${PW_FOLDER}/logs/archive +[[ "${IP}" = "10.2.1."* ]] && PW_LOGFOLDER=${PW_FOLDER}/offsite/logs || PW_LOGFOLDER=${PW_FOLDER}/mainsite/logs +PW_LOGARCHIVE=${PW_LOGFOLDER}/archive PW_TMPFOLDER=${PW_FOLDER}/.tmp @@ -35,7 +36,6 @@ M_SRVCOPT=(start stop restart reload enable disable) source ${PW_FOLDER}/conf/settings.conf -IP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) # if [[ "${IP}" = "10.2.1."* ]]; then mqtt_conn="/usr/bin/mosquitto_sub -h ${PW_IP} -u ${PW_MQTT_USER} -P ${PW_MQTT_PASS}" mysql_conn="/usr/bin/mariadb -h 127.0.0.1 -P 3308 --user=${PW_MYSQL_USER} --password=${PW_MYSQL_PASS}"