do not abort, if torrent is not running

This commit is contained in:
Raphael Dannecker 2023-09-23 08:04:56 +02:00
parent b62498da3a
commit 27985c08b3

View file

@ -22,7 +22,7 @@ upload_image() {
echo "File not found ${VM_NAME}.xml" >&2 echo "File not found ${VM_NAME}.xml" >&2
exit 1 exit 1
fi fi
sudo -u lmnsynci /usr/local/bin/vmimage-torrent stop "${VM_NAME}.qcow2" sudo -u lmnsynci /usr/local/bin/vmimage-torrent stop "${VM_NAME}.qcow2" || echo "VMImage-torrent not running"
# link private VM-Diskimage to system-Dir # link private VM-Diskimage to system-Dir
if [[ -f "${VM_DIR}/${VM_NAME}.qcow2" \ if [[ -f "${VM_DIR}/${VM_NAME}.qcow2" \
&& ( -f "/lmn/vm/${VM_NAME}.qcow2" && ("${VM_DIR}/${VM_NAME}.qcow2" -nt "/lmn/vm/${VM_NAME}.qcow2") \ && ( -f "/lmn/vm/${VM_NAME}.qcow2" && ("${VM_DIR}/${VM_NAME}.qcow2" -nt "/lmn/vm/${VM_NAME}.qcow2") \