feat: when config has already been setup
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-11-30 11:35:24 +01:00
parent 77f5ec7475
commit b0ec41fa93
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -35,7 +35,14 @@ curl -L "https://api-minio.front.kjuulh.io/${S3_BUCKET}/releases/${APP_NAME}/${A
# Make binary executable
chmod +x "${INSTALL_DIR}/${BINARY_NAME}"
churn agent setup --discovery "${CHURN_DISCOVERY}"
res=$(churn agent setup --discovery "${CHURN_DISCOVERY}")
exit_code=$?
if [[ $exit_code != 0 ]]; then
if [[ "$res" != *"Error: config file already exists"* ]]; then
echo "$res"
exit 1
fi
fi
# Create systemd service file
echo "Creating systemd service..."