From 98e87ea3a8d156cee2af9084e314b2a5e24c951b Mon Sep 17 00:00:00 2001 From: Damon To Date: Mon, 19 Aug 2024 19:16:48 +0800 Subject: [PATCH] chore: Update deploy script to stop estkme-cloud before installing lpac and estkme-cloud --- scripts/deploy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index c77b7b4..17d0f3d 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -20,6 +20,11 @@ fi # Install dependencies. apt-get update -y && apt-get install -y unzip cmake pkg-config libcurl4-openssl-dev zip curl +# if estkme-cloud is already running stop it. +if supervisorctl status estkme-cloud | grep -q RUNNING; then + supervisorctl stop estkme-cloud +fi + # Download the latest version of lpac and compile it. LPAC_VERSION=$(curl -Ls https://api.github.com/repos/estkme-group/lpac/releases/latest | grep tag_name | cut -d '"' -f 4) curl -L -o lpac-"$LPAC_VERSION".zip https://github.com/estkme-group/lpac/archive/refs/tags/"$LPAC_VERSION".zip @@ -32,11 +37,6 @@ cp build/output/lpac "$DST_DIR" cd .. rm -rf lpac-* -# if estkme-cloud is already running stop it. -if supervisorctl status estkme-cloud | grep -q RUNNING; then - supervisorctl stop estkme-cloud -fi - # Download and Install estkme-cloud. ESTKME_CLOUD_VERSION=$(curl -Ls https://api.github.com/repos/damonto/estkme-cloud/releases/latest | grep tag_name | cut -d '"' -f 4) curl -L -o "$DST_DIR"/estkme-cloud https://github.com/damonto/estkme-cloud/releases/download/"$ESTKME_CLOUD_VERSION"/${ESTKME_CLOUD_BINARIES[$(uname -m)]}