From 5f4f6357197fbc3ac64bb03c51bc8d8daaf4d2c0 Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Wed, 22 Apr 2026 14:34:42 -0400 Subject: [PATCH] fix: make update runs setup automatically if config is missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After make uninstall (which wipes config/ and data/), running make update directly failed with "Couldn't find env file: config/mail/mailserver.env" because docker-compose needs the generated config files to exist. make update now checks for the sentinel config file and calls make setup first if it's missing, so uninstall → update works as a valid flow. Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 7ed261d..464f3ad 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,10 @@ shell-%: update: @echo "Pulling latest code..." git pull + @if [ ! -f config/mail/mailserver.env ]; then \ + echo "Config missing — running setup first..."; \ + $(MAKE) setup; \ + fi @echo "Rebuilding and restarting services..." PUID=$$(id -u) PGID=$$(id -g) $(DC) up -d --build @echo "Update complete. Run 'make status' to verify."