update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.7.71-07182024'
|
VERS='2.7.72-07232024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report test '
|
noheader=' update service dailytemp confsync -r -report test '
|
||||||
|
|
||||||
|
|||||||
28
esxi-scripts/cooldown.overnight.ps1
Executable file
28
esxi-scripts/cooldown.overnight.ps1
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/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 '*OMSA*' -or $_.Name -like '*RustDesk Server*' -or $_.Name -like '*MySQL-Manager*' | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*Offsite-Backups*'} | Shutdown-VMGuest -Confirm:$false
|
||||||
|
|
||||||
|
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
28
esxi-scripts/coolup.overnight.ps1
Executable file
28
esxi-scripts/coolup.overnight.ps1
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/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 '*OMSA*' -or $_.Name -like '*RustDesk Server*' -or $_.Name -like '*MySQL-Manager*' | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*Offsite-Backups*'} | Start-VM -Confirm:$false
|
||||||
|
|
||||||
|
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
17
powerwall.sh
17
powerwall.sh
@@ -167,7 +167,21 @@ COOLDOWN_SRVRM(){
|
|||||||
SHUTDOWN_SERVER 10.10.2.10 -esxi off
|
SHUTDOWN_SERVER 10.10.2.10 -esxi off
|
||||||
${PW_FOLDER}/esxi-scripts/set-drs.ps1 2
|
${PW_FOLDER}/esxi-scripts/set-drs.ps1 2
|
||||||
}
|
}
|
||||||
|
COOLDOWN_SRVRM_OVERNIGHT(){
|
||||||
|
if [ "${1}" == "OFF" ]; then
|
||||||
|
${PW_FOLDER}/esxi-scripts/cooldown.overnight.ps1
|
||||||
|
sleep 20
|
||||||
|
SHUTDOWN_SERVER 10.10.2.16 -esxi off
|
||||||
|
sleep 90
|
||||||
|
${PW_FOLDER}/esxi-scripts/set-drs.ps1 2
|
||||||
|
|
||||||
|
elif [ "${1}" == "ON" ]; then
|
||||||
|
SHUTDOWN_SERVER 10.10.2.16 -power on
|
||||||
|
sleep 600
|
||||||
|
${PW_FOLDER}/esxi-scripts/coolup.overnight.ps1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
MAINT_MODE_VERIFY_SHUTDOWN(){
|
MAINT_MODE_VERIFY_SHUTDOWN(){
|
||||||
ESXIHOST=${1}
|
ESXIHOST=${1}
|
||||||
MaintMode=""
|
MaintMode=""
|
||||||
@@ -1032,6 +1046,7 @@ fi
|
|||||||
dl|downlist) DOWNLIST;;
|
dl|downlist) DOWNLIST;;
|
||||||
|
|
||||||
cooldown) COOLDOWN_SRVRM;;
|
cooldown) COOLDOWN_SRVRM;;
|
||||||
|
cooldown-overnight) COOLDOWN_SRVRM_OVERNIGHT;;
|
||||||
|
|
||||||
oldhelp)
|
oldhelp)
|
||||||
echo -e "${idsCL[White]} Usage: ${idsCL[LightYellow]}[powerwall or pw]${idsCL[LightCyan]} {option}"
|
echo -e "${idsCL[White]} Usage: ${idsCL[LightYellow]}[powerwall or pw]${idsCL[LightCyan]} {option}"
|
||||||
|
|||||||
Reference in New Issue
Block a user