fix: kill old Caddy processes, fix .env permissions

This commit is contained in:
Claus Lohmar 2026-07-10 16:47:06 +01:00
parent b24bc4246b
commit 5e3c75d564

View file

@ -39,6 +39,9 @@ if [ "$GREENFIELD" = true ]; then
systemctl disable nextworkspace 2>/dev/null || true
rm -f /etc/systemd/system/nextworkspace.service
systemctl daemon-reload
# Kill any lingering Caddy processes on port 80/443
pkill -f "caddy run" 2>/dev/null || true
fuser -k 80/tcp 443/tcp 2>/dev/null || true
# Force clean ALL old pods, containers, and networks
for p in $(podman pod ls -q 2>/dev/null); do podman pod rm -f "$p" 2>/dev/null || true; done
podman rm -f caddy authelia launcher 2>/dev/null || true
@ -63,7 +66,7 @@ if [ "$GREENFIELD" = true ]; then
if [ -f "$BACKUP_DIR/.env" ]; then
cp "$BACKUP_DIR/.env" "$TARGET_DIR/.env"
chmod 600 "$TARGET_DIR/.env"
chmod 644 "$TARGET_DIR/.env"
fi
# Generate Caddyfile