Run VM-sync only when server is reachable.
This commit is contained in:
parent
55b89ac912
commit
1c4554e9e0
1 changed files with 5 additions and 2 deletions
|
@ -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."
|
||||
sudo /usr/local/bin/desktop-sync
|
||||
check_images
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue