3 Commits
1.0.1 ... 1.0.3

Author SHA1 Message Date
gyurix
42c3275e19 Improve git clone and pull commands with timeout settings; update JSON_TARGET handling in task execution
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-13 13:12:16 +02:00
283b42bce1 rename letsencrypt task
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-07 16:16:40 +00:00
gyurix
fe5ffd3add Fix service execution commands in entrypoint script for web-installer
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-07 09:55:07 +02:00

View File

@@ -182,10 +182,10 @@ get_repositories() {
BASE=$(basename $REPO | cut -d '.' -f1) BASE=$(basename $REPO | cut -d '.' -f1)
if [ ! -d "/tmp/$BASE" ]; then if [ ! -d "/tmp/$BASE" ]; then
git clone $REPO /tmp/$BASE >/dev/null GIT_HTTP_CONNECT_TIMEOUT=10 GIT_HTTP_TIMEOUT=30 git clone $REPO /tmp/$BASE >/dev/null
else else
cd /tmp/$BASE cd /tmp/$BASE
git pull >/dev/null GIT_HTTP_CONNECT_TIMEOUT=10 GIT_HTTP_TIMEOUT=30 git pull >/dev/null
fi fi
if [ -f "/tmp/$BASE/applications-tree.json" ]; then if [ -f "/tmp/$BASE/applications-tree.json" ]; then
TREES=$TREES" /tmp/$BASE/applications-tree.json" TREES=$TREES" /tmp/$BASE/applications-tree.json"
@@ -550,9 +550,9 @@ upgrade() {
if [ "$NAME" == "web-installer" ]; then if [ "$NAME" == "web-installer" ]; then
debug "$service_exec service-framework-scheduler.containers.webserver start info" debug "$service_exec service-framework.containers.webserver start info"
$service_exec service-framework-scheduler.containers.webserver stop force $service_exec service-framework.containers.webserver stop force
$service_exec service-framework-scheduler.containers.webserver start info & $service_exec service-framework.containers.webserver start info &
else else
@@ -594,7 +594,7 @@ execute_task() {
#fi; #fi;
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "INSTALL_STATUS": "'$INSTALL_STATUS'" }' | jq -r . | base64 -w0) JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "INSTALL_STATUS": "'$INSTALL_STATUS'" }' | jq -r . | base64 -w0)
elif [ "$TASK_NAME" == "letsencrypt" ]; then elif [ "$TASK_NAME" == "request_letsencrypt" ]; then
DOMAINS=$(echo $B64_JSON | base64 -d | jq -r 'keys[]') DOMAINS=$(echo $B64_JSON | base64 -d | jq -r 'keys[]')
for DOMAIN in $(echo $DOMAINS); do for DOMAIN in $(echo $DOMAINS); do
REQUEST=$(echo $B64_JSON | base64 -d | jq -r ".[\"$DOMAIN\"].status") REQUEST=$(echo $B64_JSON | base64 -d | jq -r ".[\"$DOMAIN\"].status")
@@ -604,6 +604,7 @@ execute_task() {
touch /etc/system/data/ssl/keys/$DOMAIN/new_certificate touch /etc/system/data/ssl/keys/$DOMAIN/new_certificate
fi fi
done done
JSON_TARGET=$B64_JSON
elif [ "$TASK_NAME" == "system" ]; then elif [ "$TASK_NAME" == "system" ]; then
#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" #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"
@@ -903,6 +904,7 @@ execute_task() {
CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -v framework-scheduler) CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -v framework-scheduler)
RESULT=$(echo "$CONTAINERS" | base64 -w0) RESULT=$(echo "$CONTAINERS" | base64 -w0)
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "RESULT": "'$RESULT'" }' | jq -r . | base64 -w0) JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "RESULT": "'$RESULT'" }' | jq -r . | base64 -w0)
elif [ "$TASK_NAME" == "upgrade" ]; then elif [ "$TASK_NAME" == "upgrade" ]; then
JSON="$(echo $B64_JSON | base64 -d)" JSON="$(echo $B64_JSON | base64 -d)"
NAME=$(echo "$JSON" | jq -r .NAME | awk '{print tolower($0)}') NAME=$(echo "$JSON" | jq -r .NAME | awk '{print tolower($0)}')
@@ -912,6 +914,9 @@ execute_task() {
else else
upgrade "$NAME" upgrade "$NAME"
fi fi
CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -E 'framework-scheduler|webserver')
RESULT=$(echo "$CONTAINERS" | base64 -w0)
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "RESULT": "'$RESULT'" }' | jq -r . | base64 -w0)
fi fi
if [ "$TASK_NAME" != "check_vpn" ]; then if [ "$TASK_NAME" != "check_vpn" ]; then