refactor(ST-mmuwreer): expliciete if-blocks voor /var/log/agent en /var/run/agent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scrum4Me Agent 2026-05-03 18:19:57 +02:00
parent 62beca1f0d
commit 0be746c712

View file

@ -35,12 +35,14 @@ fi
rm -f /var/cache/.write-test rm -f /var/cache/.write-test
log "/var/cache OK (fs=${_cache_fs})" log "/var/cache OK (fs=${_cache_fs})"
# Lighter warning-only check voor log/state mounts # Lighter warning-only check voor log/state mounts
for _d in /var/log/agent /var/run/agent; do _logdir_fs=$(stat -f -c %T /var/log/agent 2>/dev/null || echo unknown)
_d_fs=$(stat -f -c %T "$_d" 2>/dev/null || echo unknown) if [ "$_logdir_fs" = "tmpfs" ]; then
if [ "$_d_fs" = "tmpfs" ]; then log "WARN: /var/log/agent is tmpfs — overleeft geen container-herstart."
log "WARN: ${_d} is tmpfs — overleeft geen container-herstart." fi
_statedir_fs=$(stat -f -c %T /var/run/agent 2>/dev/null || echo unknown)
if [ "$_statedir_fs" = "tmpfs" ]; then
log "WARN: /var/run/agent is tmpfs — overleeft geen container-herstart."
fi fi
done
# ----- 1. dirs op bind-mounts ------------------------------------------- # ----- 1. dirs op bind-mounts -------------------------------------------
log "ensuring directories on bind-mounts" log "ensuring directories on bind-mounts"