From 3b23a027097e8055da4ee25075ef371fc239b623 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Aug 2022 18:59:24 +0200 Subject: [PATCH] fix Status of container for each versions of LXD --- utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.sh b/utils.sh index 28d24d3..0232d8f 100755 --- a/utils.sh +++ b/utils.sh @@ -118,7 +118,7 @@ rotate_image() local should_restart=0 # If the container is running, stop it - if [ $(lxc info $instance_to_publish | grep Status | awk '{print $2}') = "RUNNING" ] + if [ "$(lxc info $instance_to_publish | grep Status | awk '{print tolower($2)}')" = "running" ] then should_restart=1 lxc stop "$instance_to_publish"