displays the location to help debug if there is a problem when launching the container

This commit is contained in:
Kay0u 2021-10-13 16:51:03 +02:00
parent 9f6cc8dceb
commit 03b82bf1c8
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -25,7 +25,12 @@ LXC_CREATE () {
else else
log_critical "Can't find base image $LXC_BASE, run ./package_check.sh --rebuild" log_critical "Can't find base image $LXC_BASE, run ./package_check.sh --rebuild"
fi fi
[[ "${PIPESTATUS[0]}" -eq 0 ]] || exit 1
pipestatus="${PIPESTATUS[0]}"
location=$(lxc list --format json | jq -e --arg LXC_NAME $LXC_NAME '.[] | select(.name==$LXC_NAME) | .location' | tr -d '"')
[[ "$location" != "none" ]] && log_info "... on $location"
[[ "$pipestatus" -eq 0 ]] || exit 1
_LXC_START_AND_WAIT $LXC_NAME _LXC_START_AND_WAIT $LXC_NAME
set_witness_files set_witness_files