Update vmcreate1.sh
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user