deployment in background, check pid if finished

This commit is contained in:
2024-12-20 10:28:29 +01:00
parent 8192815ac4
commit e509f9f768
2 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/sh
PID="$1"
TASK="$2"
DATE="$3";
REDIS_SERVER="$4"
REDIS_PORT="$5"
if [ "$PID" != "" ]; then
debug "JSON_TARGET: $JSON_TARGET"
wait $PID
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "STATUS": "2" }' | jq -r . | base64 -w0)
debug "JSON_TARGET: $JSON_TARGET"
redis-cli -h $REDIS_SERVER -p $REDIS_PORT SET $TASK "$JSON_TARGET"
fi;