5 Commits

Author SHA1 Message Date
gyurix
ba8af23f42 Merge branch 'main' of https://git.format.hu/safebox/framework-scheduler
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-29 12:00:27 +02:00
gyurix
c5da839c5b Add support for editing deployments in entrypoint script 2025-05-29 12:00:25 +02:00
a575bcbf46 app icon
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-29 09:43:38 +00:00
gyurix
06658b59d3 Remove installation of empty file and simplify deployment structure in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-29 11:22:57 +02:00
2f914cf8d9 app icon
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-28 16:13:35 +00:00

View File

@@ -111,13 +111,12 @@ create_htpasswd_file() {
fi
}
install -m 664 -g 65534 /dev/null
deploy_additionals() {
local DIR="$1"
local NAME="$2"
local JSON="$(echo "$3" | base64 -d)"
local ACTION="$4"
debug "DEPLOY: $NAME"
debug "JSON: $JSON"
@@ -149,6 +148,11 @@ deploy_additionals() {
done
# start service
if [ "$ACTION" == "edit" ]; then
debug "$service_exec service-$NAME.json stop force"
$service_exec service-$NAME.json stop force
fi
debug "$service_exec service-$NAME.json start info"
$service_exec service-$NAME.json start info &
PID=$!
@@ -805,12 +809,13 @@ execute_task() {
for APP in $APPS; do
APP_NAME=$(echo "$APP" | jq -r '.name')
APP_VERSION=$(echo "$APP" | jq -r '.version')
APP_ICON=$(echo "$APP" | jq -r '.icon')
if [ "$DEPLOYMENTS" != "" ]; then
SEP=","
else
SEP=""
fi
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": "'$APP_VERSION'"'
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": {"version": "'$APP_VERSION'", "icon": "'$APP_ICON'"}'
done
done
if [ "$DEPLOYMENTS" == "" ]; then
@@ -900,6 +905,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" == "edit" ]; then
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