From 01a63214e97bbb2872e64fc7bce46ee779094701 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 22 Feb 2024 23:04:49 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- esxi-scripts/cooldown.ps1 | 62 +++++++++++++++++++++++++++++++++++++++ powerwall.sh | 7 +++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100755 esxi-scripts/cooldown.ps1 diff --git a/defaults.inc b/defaults.inc index 38051e99..5ffa7e55 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.6.38-02262024' +VERS='2.6.39-02262024' noheader=' update service dailytemp confsync -r -report ' diff --git a/esxi-scripts/cooldown.ps1 b/esxi-scripts/cooldown.ps1 new file mode 100755 index 00000000..85429b29 --- /dev/null +++ b/esxi-scripts/cooldown.ps1 @@ -0,0 +1,62 @@ +#!/usr/bin/env pwsh +. /opt/idssys/powerwall/settings.ps1 + +Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null + +Get-VM | Where {$_.Name -like '*MySQL-Node2*' -or $_.Name -like '*Webserver-Node2*' -or $_.Name -like '*LB-Node2*' -or $_.Name -like '*WAN-DNS-Node3*' -or $_.Name -like '*UniFi-Camera-Proxy*' -or $_.Name -like '*Internet Monitor*' -or $_.Name -like '*OMSA*' -or $_.Name -like '*OpenConnect VPN*' -or $_.Name -like '*RustDesk Server*'} | Shutdown-VMGuest -Confirm:$false + +Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/powerwall.sh b/powerwall.sh index a0a4fdcc..3e41446c 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -160,6 +160,11 @@ CONSERVE_POWER(){ SHUTDOWN_SERVER ${PW_MAIN_ISCSI} -esxi off SHUTDOWN_SERVER 10.10.2.16 -esxi off } +COOLDOWN_SRVRM(){ + ${PW_FOLDER}/esxi-scripts/cooldown.ps1 + sleep 20 + SHUTDOWN_SERVER 10.10.2.16 -esxi off +} MAINT_MODE_VERIFY_SHUTDOWN(){ ESXIHOST=${1} @@ -1000,6 +1005,8 @@ fi dl|downlist) DOWNLIST;; + cooldown) COOLDOWN_SRVRM;; + oldhelp) echo -e "${idsCL[White]} Usage: ${idsCL[LightYellow]}[powerwall or pw]${idsCL[LightCyan]} {option}" echo