Improve check-swap-space.ps1

This commit is contained in:
Markus Fleschutz 2021-03-30 08:23:51 +02:00
parent d3b6934da7
commit 3a0daeb85a

View File

@ -23,6 +23,10 @@ try {
}
}
if ($Total -eq "0") {
write-warning "No swap space configured!"
exit 1
}
if ($Free -lt $MinLevel) {
write-warning "Swap space has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
exit 1