From 2e2a554aa318846b30feff29f827f724e0cc2a67 Mon Sep 17 00:00:00 2001 From: Stian Meyer <55747141+stianmeyer@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:36:46 +0200 Subject: [PATCH 1/3] Update backend.docker-entrypoint.sh --- docker/backend.docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend.docker-entrypoint.sh b/docker/backend.docker-entrypoint.sh index 25772fd..ec8783b 100755 --- a/docker/backend.docker-entrypoint.sh +++ b/docker/backend.docker-entrypoint.sh @@ -9,7 +9,7 @@ log() { } # Copy files from agents_backup to agents if agents directory is empty -if [ -d "/app/agents" ] && [ -z "$(ls -A /app/agents 2>/dev/null)" ]; then +if [ -d "/app/agents" ] && [ -z "$(find /app/agents -mindepth 1 -not -name 'lost+found' | head -n 1)" ]; then if [ -d "/app/agents_backup" ]; then log "Agents directory is empty, copying from backup..." cp -r /app/agents_backup/* /app/agents/ From 811f5b5885676c3850f1badcbf13687466f81974 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:55:46 +0100 Subject: [PATCH 2/3] docs(docker): add description for 'edge' tag --- docker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/README.md b/docker/README.md index 4fd77ae..bbe38e3 100644 --- a/docker/README.md +++ b/docker/README.md @@ -19,6 +19,7 @@ PatchMon is a containerised application that monitors system patches and updates - `x.y.z`: Full version tags (e.g. `1.2.3`) - Use this for exact version pinning. - `x.y`: Minor version tags (e.g. `1.2`) - Use this to get the latest patch release in a minor version series. - `x`: Major version tags (e.g. `1`) - Use this to get the latest minor and patch release in a major version series. +- `edge`: The latest development build with the most recent features and fixes. This tag may often be unstable and is intended only for testing and development purposes. These tags are available for both backend and frontend images as they are versioned together. From 2db839556ca8cea8dbf227e5db6cf5f6168f35a6 Mon Sep 17 00:00:00 2001 From: Stian Meyer <55747141+stianmeyer@users.noreply.github.com> Date: Mon, 6 Oct 2025 00:24:07 +0200 Subject: [PATCH 3/3] Copy from agents_backup only when no .sh scripts are present --- docker/backend.docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend.docker-entrypoint.sh b/docker/backend.docker-entrypoint.sh index ec8783b..486f05d 100755 --- a/docker/backend.docker-entrypoint.sh +++ b/docker/backend.docker-entrypoint.sh @@ -8,8 +8,8 @@ log() { echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" >&2 } -# Copy files from agents_backup to agents if agents directory is empty -if [ -d "/app/agents" ] && [ -z "$(find /app/agents -mindepth 1 -not -name 'lost+found' | head -n 1)" ]; then +# Copy files from agents_backup to agents if agents directory is empty and no .sh files are present +if [ -d "/app/agents" ] && [ -z "$(find /app/agents -maxdepth 1 -type f -name '*.sh' | head -n 1)" ]; then if [ -d "/app/agents_backup" ]; then log "Agents directory is empty, copying from backup..." cp -r /app/agents_backup/* /app/agents/