setup.sh: enhance waiting for vm to boot

This commit is contained in:
admin666 2024-08-20 10:23:45 +00:00
parent 610daffb7f
commit a581682538
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ echo "Starting vm..."
virsh start ${vm}
echo "Waiting for ${vm} to boot..."
sleep 20
sudo -u admin666 ssh -o ConnectTimeout=60 ${vm} "echo Connected!"
echo "Setting up hostname..."
sudo -u admin666 ssh -4 ${vm} "sudo hostnamectl set-hostname ${vm}"
@ -46,11 +46,11 @@ echo "Rebooting..."
sudo -u admin666 ssh -4 ${vm} "sudo reboot"
echo "Waiting for ${vm} to boot..."
sleep 20
sudo -u admin666 ssh -o ConnectTimeout=60 ${vm} "echo Connected!"
echo "Updating packages..."
sudo -u admin666 ssh -4 ${vm} "sudo apt-get update"
sudo -u admin666 ssh -4 ${vm} 'sudo apt-get full-upgrade -y -o Dpkg::Options::="--force-confold"'
sudo -u admin666 ssh -4 ${vm} 'sudo apt-get full-upgrade -y -o Dpkg::Options::="--force-confdef"'
sudo -u admin666 ssh -4 ${vm} "sudo apt-get autoremove -y"
echo "Installing base packages..."