Update vmcreate1.sh

This commit is contained in:
2025-10-22 19:05:26 +00:00
parent 50e9e065d9
commit 34524fb37e

View File

@@ -10,15 +10,23 @@ show_help()
echo "\nIf file not specified, script will use arguments as a list of IP addresses."
echo "In this case Hostname will be inherited from 2 last IP octets. Example for 10.10.35.20: 'vm035020'."
make_file ()
make_file (){
ip_check ()
}
hostame_generate()
ip_check (){
}
hostame_generate(){
}
keypair_generate (){
generate_keypair ()
#указать в конце функции переменную для вывода названия приватного ключа
privkey=
}
while getopts "a:f:h" opt; do
case $opt in
@@ -51,7 +59,7 @@ do
# ДОБАВИТЬ правило HA если $haadd
done
echo "VMs from 'hosts' successfully created"
if [ -e $privkey ]
if [ -v $privkey ]
then
echo "Generated private key $privkey"
echo "SAVE IT!"