Fix fail2ban bangui-access jail log file not found
Two root causes: 1. Docker/compose.debug.yml volume mount ./Docker/logs was already correct (./logs) — no change needed there. 2. Docker/logs/access.log did not exist on first checkout because *.log is gitignored. fail2ban fails to start if the file is absent. Fix: touch Docker/logs/access.log and auth.log in the Makefile 'up' target so both stub files are always created before the stack starts, regardless of whether they were previously generated by simulation scripts.
This commit is contained in:
3
Makefile
3
Makefile
@@ -42,7 +42,10 @@ RUNTIME := $(shell command -v podman 2>/dev/null || echo "docker")
|
||||
.PHONY: up down build restart logs clean dev-ban-test
|
||||
|
||||
## Start the debug stack (detached).
|
||||
## Ensures log stub files exist so fail2ban can open them on first start.
|
||||
up:
|
||||
@mkdir -p Docker/logs
|
||||
@touch Docker/logs/access.log Docker/logs/auth.log
|
||||
$(COMPOSE) -f $(COMPOSE_FILE) up -d
|
||||
|
||||
## Stop the debug stack.
|
||||
|
||||
Reference in New Issue
Block a user