From 1eb082cc47342614f8563ea31741fc2b9b8c7651 Mon Sep 17 00:00:00 2001 From: hael Date: Thu, 13 Mar 2025 13:10:41 +0100 Subject: [PATCH] uninstall --- scripts/scheduler/entrypoint.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/scheduler/entrypoint.sh b/scripts/scheduler/entrypoint.sh index 7e5dcf8..0dcf316 100644 --- a/scripts/scheduler/entrypoint.sh +++ b/scripts/scheduler/entrypoint.sh @@ -148,8 +148,8 @@ remove_additionals() { # stop service # force - remove stopped container, docker rm - debug "$service_exec service-$NAME.json stop force dns-remove &" - $service_exec service-$NAME.json stop force dns-remove & + debug "$service_exec service-$NAME.json stop force dns-remove" + $service_exec service-$NAME.json stop force dns-remove # remove service files rm $SERVICE_DIR/*"-"$NAME.json # service, domain, etc. @@ -750,6 +750,13 @@ execute_task() { DEPLOY_PAYLOAD=$(echo "$JSON" | jq -r .PAYLOAD) # base64 list of key-value pairs in JSON deploy_additionals "$APP_DIR" "$DEPLOY_NAME" "$DEPLOY_PAYLOAD" sh /scripts/check_pid.sh "$PID" "$SHARED" "deploy-$DEPLOY_NAME" "$DATE" "$DEBUG" & + elif [ "$DEPLOY_ACTION" == "uninstall" ]; then + #remove_additionals "$APP_DIR" "$DEPLOY_NAME" + # uninstall has finished + JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "STATUS": "2" }' | jq -r . | base64 -w0) + debug "JSON_TARGET: $JSON_TARGET" + echo $JSON_TARGET | base64 -d >$SHARED/output/"uninstall-"$DEPLOY_NAME.json + JSON_TARGET="" fi fi done