This commit is contained in:
root
2024-08-22 13:47:41 +02:00
parent ba450c5158
commit 44613e774e

View File

@@ -281,20 +281,20 @@ execute_task() {
SYSTEM_LIST=("core-dns.json" "cron.json" "domain-local-backend.json" "firewall-letsencrypt.json" "firewall-local-backend.json" "firewall-localloadbalancer-dns.json" "firewall-localloadbalancer-to-smarthostbackend.json" "firewall-smarthost-backend-dns.json" "firewall-smarthost-loadbalancer-dns.json" "firewall-smarthost-to-backend.json" "firewall-smarthostloadbalancer-from-publicbackend.json" "letsencrypt.json" "local-backend.json" "local-proxy.json" "service-framework.json" "smarthost-proxy-scheduler.json" "smarthost-proxy.json")
if [ "$TASK_NAME" == "settings" ]; then
INSTALLED_SERVICES=$(ls /etc/user/config/services/*.json );
SERVICES="";
for SERVICE in $(echo $INSTALLED_SERVICES); do
CONTENT=$(cat $SERVICE | base64 -w0);
if [ "$SERVICES" != "" ]; then
SEP=",";
else
SEP="";
fi;
SERVICES=$SERVICES$SEP'"'$(cat $SERVICE | jq -r .main.SERVICE_NAME)'": "'$CONTENT'"';
done
if [ "$TASK_NAME" == "system" ]; then
INSTALLED_SERVICES=$(ls /etc/user/config/services/*.json );
SERVICES="";
for SERVICE in $(echo $INSTALLED_SERVICES); do
CONTENT=$(cat $SERVICE | base64 -w0);
if [ "$SERVICES" != "" ]; then
SEP=",";
else
SEP="";
fi;
SERVICES=$SERVICES$SEP'"'$(cat $SERVICE | jq -r .main.SERVICE_NAME)'": "'$CONTENT'"';
done
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "INSTALL_STATUS": "'$INSTALL_STATUS'", "INSTALLED_SERVICES": {'$SERVICES'} }' | jq -r . | base64 -w0);
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "INSTALL_STATUS": "'$INSTALL_STATUS'", "INSTALLED_SERVICES": {'$SERVICES'} }' | jq -r . | base64 -w0);
elif [ "$TASK_NAME" == "deployments" ]; then
INSTALLED_SERVICES=$(ls /etc/user/config/services/*.json );