From 84b27c25ed139c95f955f7817168bd63f847d148 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 22 May 2023 13:54:54 +0200 Subject: [PATCH] match the whole word --- prepare.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prepare.sh b/prepare.sh index 39761df..b2f3ee3 100755 --- a/prepare.sh +++ b/prepare.sh @@ -12,7 +12,7 @@ trap "exit $SYSTEM_FAILURE_EXIT_CODE" ERR start_container () { if ! lxc info "$CONTAINER_IMAGE" >/dev/null 2>/dev/null ; then warn 'Container not found, copying it from the prebuilt image' - if ! lxc info "$BASE_IMAGE" | grep -q "$CURRENT_VERSION-$SNAPSHOT_NAME" + if ! lxc info "$BASE_IMAGE" | grep -w "$CURRENT_VERSION-$SNAPSHOT_NAME" >/dev/null then error "$BASE_IMAGE not found, please rebuild with rebuild_all.sh" # Inform GitLab Runner that this is a system failure, so it @@ -23,8 +23,8 @@ start_container () { fi # Stop the container if it's running if [ "$(lxc info $CONTAINER_IMAGE | grep Status | awk '{print tolower($2)}')" == "running" ]; then - lxc stop $CONTAINER_IMAGE - fi + lxc stop $CONTAINER_IMAGE + fi info "Debian version: $DEBIAN_VERSION, YunoHost version: $CURRENT_VERSION, Image used: $BASE_IMAGE, Snapshot: $SNAPSHOT_NAME"