From 7b222af1ddba2867f3b9548495d5def7aca2b616 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Nov 2024 12:20:51 +0100 Subject: [PATCH] feat: stop the service if running Signed-off-by: kjuulh --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index e622ba8..3090581 100644 --- a/install.sh +++ b/install.sh @@ -28,6 +28,11 @@ echo "Creating directories..." mkdir -p "${INSTALL_DIR}" mkdir -p "${CONFIG_DIR}" +if systemctl is-active --quiet churn.service; then + echo "Stopping existing churn service..." + systemctl stop churn.service +fi + # Download binary from S3 echo "Downloading binary..." curl -L -s "https://api-minio.front.kjuulh.io/${S3_BUCKET}/releases/${APP_NAME}/${APP_VERSION}/${BINARY_NAME}" -o "${INSTALL_DIR}/${BINARY_NAME}"