This commit is contained in:
2024-08-22 13:35:25 +02:00
parent 5dbd0325b9
commit 3533b7c0cc
2 changed files with 23 additions and 1 deletions

View File

@@ -16,6 +16,12 @@ RUN chmod +x /usr/bin/redis-cli
RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git
#### TEMPORARY KEY MANGEMENT
RUN mkdir -p /root/.ssh
COPY installer /root/.ssh/installer
RUN chmod 660 /root/.ssh/installer
###########################
COPY scripts/scheduler/*.sh /scripts/ COPY scripts/scheduler/*.sh /scripts/
RUN find ./scripts -name "*.sh" | xargs dos2unix RUN find ./scripts -name "*.sh" | xargs dos2unix
RUN ["chmod", "+x", "-R", "/scripts/"] RUN ["chmod", "+x", "-R", "/scripts/"]

View File

@@ -279,7 +279,23 @@ execute_task() {
INSTALL_STATUS="2"; # new install INSTALL_STATUS="2"; # new install
fi fi
if [ "$TASK_NAME" == "init" ]; then if [ "$TASK_NAME" == "settings" ]; then
LIST=("core-dns.json" "cron.json" "domain-local-backend.json" "firewall-letsencrypt.json" "")
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);
elif [ "$TASK_NAME" == "deployments" ]; then
INSTALLED_SERVICES=$(ls /etc/user/config/services/*.json ); INSTALLED_SERVICES=$(ls /etc/user/config/services/*.json );
SERVICES=""; SERVICES="";
for SERVICE in $(echo $INSTALLED_SERVICES); do for SERVICE in $(echo $INSTALLED_SERVICES); do