Run VM-sync only when server is reachable.

This commit is contained in:
Raphael Dannecker 2024-06-21 15:45:16 +02:00
parent 55b89ac912
commit 1c4554e9e0

View file

@ -231,8 +231,11 @@ export XDG_CONFIG_HOME="/tmp/${UID}/.config"
if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
echo "VM not yet running."
# only when school-network is reachable
if nslookup "${SEEDBOX_HOST}"; then
sudo /usr/local/bin/desktop-sync
check_images
fi
if [[ "${NEWCLONE}" = 1 ]] || [[ ! -f "${VM_DIR}/${VM_NAME}-clone.qcow2" ]]; then
create_clone "${VM_NAME}"
fi