From f5aa20f6b0faaec8a75adfd6904f7f1fc7ef7f43 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 9 Nov 2024 19:00:37 -0600 Subject: [PATCH] update --- defaults.inc | 8 ++++---- esxi-scripts/cls-shutdown.ps1 | 2 +- esxi-scripts/cooldown.overnight.ps1 | 2 +- esxi-scripts/cooldown.ps1 | 2 +- esxi-scripts/coolup.overnight.ps1 | 2 +- esxi-scripts/disable-system-vms.ps1 | 2 +- esxi-scripts/get-snapshots.ps1 | 2 +- esxi-scripts/host-maintenance_mode.ps1 | 2 +- esxi-scripts/host-vm-shutdown-verify.ps1 | 2 +- esxi-scripts/host-vm-shutdown.ps1 | 2 +- esxi-scripts/iscsi-all-shutdown-verify.ps1 | 2 +- esxi-scripts/iscsi-all-vm-shutdown.ps1 | 2 +- esxi-scripts/iscsi-server-shutdown.ps1 | 2 +- esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 | 2 +- esxi-scripts/iscsi-sys-vm-shutdown.ps1 | 2 +- esxi-scripts/iscsi-vm-shutdown-verify.ps1 | 2 +- esxi-scripts/iscsi-vm-shutdown.ps1 | 2 +- esxi-scripts/offsite-host-shutdown.ps1 | 2 +- esxi-scripts/set-drs.ps1 | 2 +- esxi-scripts/sys-suspend.ps1 | 2 +- esxi-scripts/vm-shutdown-verify.ps1 | 2 +- esxi-scripts/vm-shutdown.ps1 | 2 +- offsite-power-check.sh | 2 +- powerwall.sh | 6 +++--- 24 files changed, 29 insertions(+), 29 deletions(-) diff --git a/defaults.inc b/defaults.inc index ab839733..3d4b31ee 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.7.122-11092024' +VERS='2.7.122b-11092024' noheader=' update service dailytemp confsync -r -report test ' @@ -26,7 +26,7 @@ PW_LOGPOWER=${PW_LOGFOLDER}/log-power M_SRVCOPT=(start stop restart reload enable disable) -source ${PW_FOLDER}/settings.conf +source ${PW_FOLDER}/conf/settings.conf EMAIL_NOTICE=${PW_EMAIL_NOTICE} PUSHOVER_APP_TOKEN=${PW_PUSHOVER_APP_TOKEN} @@ -57,7 +57,7 @@ PW_ESXI_FANSPEEDCONTROLHOSTS=(${PW_ESXI_FANSPEEDCONTROL_HOSTS}) [ "${PW_TEMPIND_RANGE}" != "" ] && PW_TEMPIND_RANGE=(${PW_TEMPIND_RANGE}) unset IFS -if [ -f ${PW_FOLDER}/settings.local.conf ]; then +if [ -f ${PW_FOLDER}/conf/settings.local.conf ]; then declare -A PW_POWERWALL_SERVICES declare -A PW_THRESHOLDS declare -A PW_SENSOR_TYPE @@ -78,7 +78,7 @@ if [ -f ${PW_FOLDER}/settings.local.conf ]; then declare -A PW_MISCSENSOR_DESC declare -A PW_DESC_TEMP - source ${PW_FOLDER}/settings.local.conf + source ${PW_FOLDER}/conf/settings.local.conf [ "${PW_TEMPIND_DIFF}" == "" ] && PW_TEMPIND_DIFF=1 diff --git a/esxi-scripts/cls-shutdown.ps1 b/esxi-scripts/cls-shutdown.ps1 index 2369c2e5..33a7aec3 100755 --- a/esxi-scripts/cls-shutdown.ps1 +++ b/esxi-scripts/cls-shutdown.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/cooldown.overnight.ps1 b/esxi-scripts/cooldown.overnight.ps1 index d74ed2c5..bf663d01 100755 --- a/esxi-scripts/cooldown.overnight.ps1 +++ b/esxi-scripts/cooldown.overnight.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/cooldown.ps1 b/esxi-scripts/cooldown.ps1 index 9a504437..268871e6 100755 --- a/esxi-scripts/cooldown.ps1 +++ b/esxi-scripts/cooldown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/coolup.overnight.ps1 b/esxi-scripts/coolup.overnight.ps1 index c95b1614..43fa1513 100755 --- a/esxi-scripts/coolup.overnight.ps1 +++ b/esxi-scripts/coolup.overnight.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/disable-system-vms.ps1 b/esxi-scripts/disable-system-vms.ps1 index ada67a6d..d69818d0 100755 --- a/esxi-scripts/disable-system-vms.ps1 +++ b/esxi-scripts/disable-system-vms.ps1 @@ -2,7 +2,7 @@ ### NOT WORKING ### -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/get-snapshots.ps1 b/esxi-scripts/get-snapshots.ps1 index 2ea3bb60..a9fe9108 100755 --- a/esxi-scripts/get-snapshots.ps1 +++ b/esxi-scripts/get-snapshots.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Write-Progress -Activity "Connecting to vCenter [$VCENTERHOST] ..." -PercentComplete 20 diff --git a/esxi-scripts/host-maintenance_mode.ps1 b/esxi-scripts/host-maintenance_mode.ps1 index 6b9638ad..c8a57d3a 100755 --- a/esxi-scripts/host-maintenance_mode.ps1 +++ b/esxi-scripts/host-maintenance_mode.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/host-vm-shutdown-verify.ps1 b/esxi-scripts/host-vm-shutdown-verify.ps1 index c6d1f7aa..b34839f6 100755 --- a/esxi-scripts/host-vm-shutdown-verify.ps1 +++ b/esxi-scripts/host-vm-shutdown-verify.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Force -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/host-vm-shutdown.ps1 b/esxi-scripts/host-vm-shutdown.ps1 index 62fc8dc3..5e18fce4 100755 --- a/esxi-scripts/host-vm-shutdown.ps1 +++ b/esxi-scripts/host-vm-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Force -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/iscsi-all-shutdown-verify.ps1 b/esxi-scripts/iscsi-all-shutdown-verify.ps1 index 0e7106dc..66ceedcb 100755 --- a/esxi-scripts/iscsi-all-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-all-shutdown-verify.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/iscsi-all-vm-shutdown.ps1 b/esxi-scripts/iscsi-all-vm-shutdown.ps1 index e56a6098..da67ea47 100755 --- a/esxi-scripts/iscsi-all-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-all-vm-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/iscsi-server-shutdown.ps1 b/esxi-scripts/iscsi-server-shutdown.ps1 index d8d77f81..39a4733e 100755 --- a/esxi-scripts/iscsi-server-shutdown.ps1 +++ b/esxi-scripts/iscsi-server-shutdown.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 index baf97c4d..725695c6 100755 --- a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/iscsi-sys-vm-shutdown.ps1 b/esxi-scripts/iscsi-sys-vm-shutdown.ps1 index 02b74784..01e70567 100755 --- a/esxi-scripts/iscsi-sys-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-sys-vm-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 index 961cdd9a..f2698dfa 100755 --- a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/iscsi-vm-shutdown.ps1 b/esxi-scripts/iscsi-vm-shutdown.ps1 index 53d409fa..d7d34f1c 100755 --- a/esxi-scripts/iscsi-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/esxi-scripts/offsite-host-shutdown.ps1 b/esxi-scripts/offsite-host-shutdown.ps1 index 16516ea4..e18ada01 100755 --- a/esxi-scripts/offsite-host-shutdown.ps1 +++ b/esxi-scripts/offsite-host-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Force -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/set-drs.ps1 b/esxi-scripts/set-drs.ps1 index 4410d839..118d0b95 100755 --- a/esxi-scripts/set-drs.ps1 +++ b/esxi-scripts/set-drs.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Write-Progress -Activity "Connecting to vCenter [$VCENTERHOST] ..." -PercentComplete 20 diff --git a/esxi-scripts/sys-suspend.ps1 b/esxi-scripts/sys-suspend.ps1 index d4ff3c17..42119bd5 100755 --- a/esxi-scripts/sys-suspend.ps1 +++ b/esxi-scripts/sys-suspend.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh # Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null diff --git a/esxi-scripts/vm-shutdown-verify.ps1 b/esxi-scripts/vm-shutdown-verify.ps1 index cc934932..5a606e21 100755 --- a/esxi-scripts/vm-shutdown-verify.ps1 +++ b/esxi-scripts/vm-shutdown-verify.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 # Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index 07dcdf08..42e9d8ec 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -. /opt/idssys/powerwall/settings.ps1 +. /opt/idssys/powerwall/conf/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null diff --git a/offsite-power-check.sh b/offsite-power-check.sh index 9c89f98b..28af8e93 100755 --- a/offsite-power-check.sh +++ b/offsite-power-check.sh @@ -16,7 +16,7 @@ PWO_START(){ startup=true while true; do - . /opt/idssys/powerwall/settings.conf + . /opt/idssys/powerwall/conf/settings.conf PW_OFFSITEHOSTS=$(echo ${PW_OFFSITE_HOSTS} | tr ',' ' ') # TEST=true # TEST=full diff --git a/powerwall.sh b/powerwall.sh index c2111bd7..8c3da166 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -759,11 +759,11 @@ GET_SNAPSHOTS(){ } CONFSYNC(){ - [ "${PW_OFFSITE_MONITOR}" != "" ] && rsync -az --timeout=3 ${PW_FOLDER}/settings.conf root@${PW_OFFSITE_MONITOR}:${PW_FOLDER}/ & >/dev/null 2>&1 + [ "${PW_OFFSITE_MONITOR}" != "" ] && rsync -az --timeout=3 ${PW_FOLDER}/conf/settings.conf root@${PW_OFFSITE_MONITOR}:${PW_FOLDER}/ & >/dev/null 2>&1 if [ -f /opt/idssys/nodemgmt/conf/defaults.local.inc ]; then source /opt/idssys/nodemgmt/defaults.inc - rsync -az --timeout=3 ${PW_FOLDER}/settings.* root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall.settings.* & >/dev/null 2>&1 - # rsync -az --timeout=3 ${PW_FOLDER}/settings.ps1 root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall.settings.ps1 & >/dev/null 2>&1 + rsync -az --timeout=3 ${PW_FOLDER}/conf/* root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall/ & >/dev/null 2>&1 + # rsync -az --timeout=3 ${PW_FOLDER}/conf/settings.ps1 root@${NM_NODEMANAGER}:/opt/idssys/nodemgmt/conf/powerwall.settings.ps1 & >/dev/null 2>&1 fi }