From f7de3357fddea27611b6cd0f87b43f48af78f86d Mon Sep 17 00:00:00 2001 From: Oleg Sucharevich Date: Wed, 9 Nov 2022 15:22:18 +0200 Subject: [PATCH] replace restart with kill --- scripts/remote_replace_cloudbeat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/remote_replace_cloudbeat.sh b/scripts/remote_replace_cloudbeat.sh index 57f48ad4bd..4be8f34777 100755 --- a/scripts/remote_replace_cloudbeat.sh +++ b/scripts/remote_replace_cloudbeat.sh @@ -41,5 +41,7 @@ for P in $(get_agents); do cp_to_pod $POD $LOCAL_DIR/bundle.tar.gz $BUNDLE_DIR/bundle.tar.gz fi echo "Copied all the assets, restarting the agent $POD" - exec_pod $POD "elastic-agent restart" + PID=$(exec_pod $POD "pidof cloudbeat") + exec_pod $POD "kill -9 $PID" + # exec_pod $POD "elastic-agent restart" done