From fc08a7e515b1cd837af1598739446eedff1f0e02 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 13 Feb 2023 20:49:41 +0100 Subject: [PATCH] More sanity checks --- lib/lxc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/lxc.sh b/lib/lxc.sh index 1d56aaf..3d706f3 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -42,6 +42,12 @@ LXC_CREATE () { _LXC_START_AND_WAIT $LXC_NAME sleep 3 + + if ! lxc exec $LXC_NAME -- test -e /etc/yunohost + then + log_critical "Failed to run 'test -e /etc/yunohost' on the container ... either the container did not start, or YunoHost doesn't exists yet in the container :/" + fi + set_witness_files sleep 3 log_info "Creating initial snapshot $LXC_NAME ..."