|
|
|
@@ -208,8 +208,22 @@ remove_additionals() {
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
ENV_FILES=$(cat $SERVICE_DIR/service-$NAME.json | jq -r '[.containers[] | select(has("ENV_FILES")) | .ENV_FILES[]] | unique[]')
|
|
|
|
|
for ENV_FILE in $(echo $ENV_FILES); do
|
|
|
|
|
if [ -f "$ENV_FILE" ]; then
|
|
|
|
|
rm -rf $ENV_FILE
|
|
|
|
|
debug "deleted enviroment file: $ENV_FILE"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
VOLUMES=$(cat $SERVICE_DIR/service-$NAME.json | jq -r '[.containers[] | select(has("VOLUMES")) | .VOLUMES[] | select(.SHARED != "true") | .SOURCE] | unique[]' | grep -vE 'USER|SYSTEM')
|
|
|
|
|
for VOLUME in $(echo $VOLUMES); do
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
for VOLUME in $(echo $VOLUMES | grep -vE 'USER|SYSTEM|SHARED'); do
|
|
|
|
|
if [ "$(echo $VOLUME | cut -d '/' -f1)" ]; then
|
|
|
|
|
docker volume rm $VOLUME
|
|
|
|
|
debug "deleted volume: $VOLUME"
|
|
|
|
@@ -217,11 +231,6 @@ remove_additionals() {
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# remove service files
|
|
|
|
|
rm $SERVICE_DIR/*"-"$NAME.json # service, domain, etc.
|
|
|
|
|
|
|
|
|
@@ -607,14 +616,16 @@ upgrade() {
|
|
|
|
|
|
|
|
|
|
if [ "$NAME" == "web-installer" ]; then
|
|
|
|
|
|
|
|
|
|
debug "$service_exec service-framework.containers.webserver start info"
|
|
|
|
|
debug "$service_exec service-framework.containers.webserver stop force"
|
|
|
|
|
$service_exec service-framework.containers.webserver stop force
|
|
|
|
|
debug "$service_exec service-framework.containers.webserver start info"
|
|
|
|
|
$service_exec service-framework.containers.webserver start info &
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
debug "$service_exec $NAME.json start info"
|
|
|
|
|
debug "$service_exec $NAME.json stop force"
|
|
|
|
|
$service_exec $NAME.json stop force
|
|
|
|
|
debug "$service_exec $NAME.json start info"
|
|
|
|
|
$service_exec $NAME.json start info &
|
|
|
|
|
fi
|
|
|
|
|
PID=$!
|
|
|
|
@@ -794,12 +805,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
|
|
|
|
@@ -967,8 +979,8 @@ execute_task() {
|
|
|
|
|
JSON="$(echo $B64_JSON | base64 -d)"
|
|
|
|
|
NAME=$(echo "$JSON" | jq -r .NAME | awk '{print tolower($0)}')
|
|
|
|
|
if [ "$NAME" == "framework" ]; then
|
|
|
|
|
upgrade_scheduler
|
|
|
|
|
upgrade "web-installer"
|
|
|
|
|
upgrade_scheduler
|
|
|
|
|
#CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -E 'framework-scheduler|webserver')
|
|
|
|
|
else
|
|
|
|
|
upgrade "$NAME"
|
|
|
|
|