From 42c6ee29daa87d1ba71d6972f7ef5538960a381f Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:36:48 +1000 Subject: [PATCH] Add info and error messages to LXC template DL --- ct/create_lxc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 75224f04d..a49a5d30f 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -181,9 +181,11 @@ fi if [ -d "/var/lib/vz/template/cache" ]; then TEMPLATE=$PCT_OSTYPE-$TEMPLATE_VARIENT-rootfs.tar.xz # Download template if needed - if [ -f "/var/lib/vz/template/cache/$TEMPLATE"]; then + if [ -f "/var/lib/vz/template/cache/$TEMPLATE" ]; then templateurl="https://jenkins.linuxcontainers.org/job/image-$PCT_OSTYPE/architecture=arm64,release=$TEMPLATE_VARIENT,variant=default/lastStableBuild/artifact/rootfs.tar.xz" - wget $templateurl -O $TEMPLATE -q + msg_info "Downloading LXC Template" + wget $templateurl -O $TEMPLATE -q || exit "A problem occured while downloading the LXC template." + msg_ok "Downloaded LXC Template" fi else TEMPLATE="$(pveam available | grep -E "arm64.*$PCT_OSTYPE-$TEMPLATE_VARIENT" | sed 's/arm64[[:space:]]*//')"