Update vmcreate1.sh

This commit is contained in:
2025-10-22 19:09:28 +00:00
parent 34524fb37e
commit 4a28db8738

View File

@@ -11,7 +11,7 @@ show_help()
echo "In this case Hostname will be inherited from 2 last IP octets. Example for 10.10.35.20: 'vm035020'." echo "In this case Hostname will be inherited from 2 last IP octets. Example for 10.10.35.20: 'vm035020'."
make_file (){ make_file (){
touch hosts.tmp
} }
ip_check (){ ip_check (){
@@ -58,9 +58,13 @@ do
qm start $vmnum qm start $vmnum
# ДОБАВИТЬ правило HA если $haadd # ДОБАВИТЬ правило HA если $haadd
done done
if [ -e hosts.tmp]
then
rm hosts.tmp
fi
echo "VMs from 'hosts' successfully created" echo "VMs from 'hosts' successfully created"
if [ -v $privkey ] if [ -v $privkey ]
then then
echo "Generated private key $privkey" echo "Generated private key $privkey"
echo "SAVE IT!" echo "SAVE IT!"
fi fi