From 3797cd6623f9c0887b47f432a5469838de18e749 Mon Sep 17 00:00:00 2001 From: Ereiarrus Date: Tue, 30 Jan 2024 21:02:54 +0000 Subject: [PATCH] killing nohup only after container built --- docker_run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_run.sh b/docker_run.sh index 865a795..0ead5ae 100644 --- a/docker_run.sh +++ b/docker_run.sh @@ -1,8 +1,6 @@ #!/bin/bash -restarter="$(pgrep restart_24.sh)" -kill "$restarter" #restarter_kill_status="$?" #if [ "$restarter_kill_status" != 0 ]; then # >&2 echo "error on killing restarter script" @@ -22,6 +20,8 @@ if [ -z "$old_container_id" ]; then docker stop previous_container fi else + restarter="$(pgrep restart_24.sh)" + kill "$restarter" docker stop "$old_container_id" > /dev/null 2>&1 fi