From c657d4b03ee777e51541c56f4f1524f3cafd5b82 Mon Sep 17 00:00:00 2001 From: Dimitri Mazmanov Date: Tue, 9 Aug 2016 16:23:50 +0200 Subject: pgrep didn't use the right process name Change-Id: I07b83468a8db4ef0ccc868ec8eba0f9b8c591089 Signed-off-by: Dimitri Mazmanov --- tools/kingbird/deploy.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/kingbird/deploy.sh b/tools/kingbird/deploy.sh index 9cca95e..6077d68 100755 --- a/tools/kingbird/deploy.sh +++ b/tools/kingbird/deploy.sh @@ -51,8 +51,10 @@ sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ "ssh $ssh_options ${controller_ip} \"cd /root/ && cat install.log\"" -engine_pid=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} "ssh $ssh_options ${controller_ip} \"pgrep kingbird-engine || echo dead\"") &> /dev/null -api_pid=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} "ssh $ssh_options ${controller_ip} \"pgrep kingbird-api || echo dead\"") &> /dev/null +sleep 5 + +engine_pid=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} "ssh $ssh_options ${controller_ip} \"pgrep -f kingbird-engine || echo dead\"") &> /dev/null +api_pid=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} "ssh $ssh_options ${controller_ip} \"pgrep -f kingbird-api || echo dead\"") &> /dev/null if [ "$engine_pid" == "dead" ]; then error "Kingbird engine is not running." @@ -61,3 +63,5 @@ fi if [ "$api_pid" == "dead" ]; then error "Kingbird API is not running." fi + +echo "Deployment complete!" -- cgit 1.2.3-korg