new script / wrapper around virt-install

This commit is contained in:
Lukas Greve
2025-05-21 17:35:57 +02:00
parent 1dfc10b5c9
commit 3fafb78838
4 changed files with 113 additions and 0 deletions

13
scripts/core-count.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Get the core count using nproc --all
core_count=$(nproc --all)
# Check if nproc --all returns a numerical value greater than 2
if (( core_count > 1 )); then
echo "System has more than 1 core (nproc --all: $core_count)."
else
echo "Warning: System has only $core_count core)."
echo "The script requires at least two cores"
exit 1 # Exit with an error code to indicate the condition is not met
fi