Commit Graph

57 Commits (v1.1.428)

Author SHA1 Message Date
boban b7e411be82 Fix: artisan_up ans Ende verschoben – 503-Seite bleibt bis alles fertig ist 2026-04-27 05:30:53 +02:00
boban ff28b98555 Fix: Fail2ban Restzeit via Python3-Script statt sqlite3-CLI (nicht installiert) 2026-04-27 05:20:10 +02:00
boban 3e157f4e56 Fix: Update-Modal wartet auf [DONE]-Marker im Log bevor done-State angezeigt wird 2026-04-27 04:17:21 +02:00
boban d84537b343 Fix: Fail2ban Restzeit-Fallback bei abgelaufenem DB-Eintrag + Update-Modal 2s Verzögerung vor done-State 2026-04-27 04:10:02 +02:00
boban aaeea2bb86 Fix: Fail2Ban-Dateien auf clubird umbenannt (clubird-fail2ban, clubird-jails.local) 2026-04-27 03:54:53 +02:00
boban f266228fcf Fix: Fail2Ban Sudoers + Jails automatisch via ensure_system einrichten 2026-04-27 03:53:29 +02:00
boban fcbe944e32 Fix: optimize:clear+optimize nach PHP-FPM Restart ausführen (kein 404)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 22:38:15 +02:00
boban 598f0edacf Fix: mailwolt-sandbox-sync via update.sh automatisch installieren
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 22:34:52 +02:00
boban 77fad53655 Fix: ClamAV-Socket false-positive + --check-only als root + Backup sudoers
ClamAV: nur systemd-Probe – Socket-Datei bleibt nach Stop erhalten.
--check-only: git ls-remote als root statt www-data (keine Credentials).
Backup: /etc/sudoers.d/mailwolt immer anlegen, unabhängig von certbot/dkim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:52:02 +02:00
boban de314adebe Fix: Backup läuft als root via sudo – keine Permission-Fehler mehr
mailwolt-backup Script liest /etc/dovecot/private, /etc/letsencrypt/live
etc. als root. ensure_system() installiert es nach sbin + sudoers.
BackupRun.php ruft es via sudo -n auf.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:37:27 +02:00
boban a96d8f690a Fix: Wartungsmodus immer aktiv während Cache-Rebuild – kein 404 mehr
artisan down/up umschließt jetzt immer fix_permissions, nicht nur bei
Migrations/Composer/PHP-Restart. Requests während optimize:clear+optimize
bekommen 503 statt 404 durch fehlenden Bootstrap-Cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:26:42 +02:00
boban b0daf839d9 Fix: ensure_system() schreibt Versionsdateien nach jedem Update-Lauf
/var/lib/mailwolt/version blieb bei manuellem git pull oder abgebrochenem
Update auf altem Stand. UpdateCard-Vergleich schlug dadurch fehl und
zeigte kein "Update verfügbar" an.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:24:20 +02:00
boban ce66a84c8d Fix: ClamAV wird beim Update automatisch installiert, UI nur Ein/Aus
ensure_system() installiert clamav-daemon falls nicht vorhanden,
deaktiviert aber den Dienst. User sieht nur noch Ein/Ausschalten.
Install-Button, $installed-Property und install()-Methode entfernt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:19:26 +02:00
boban 5f627dcb0e Fix: ClamAV enable mit --no-block + kein Queue-Job nötig
systemctl start --no-block kehrt sofort zurück, systemd startet ClamAV
im Hintergrund. runCmd('enable') direkt aufrufen statt Queue-Job.
wire:poll.keep-alive verhindert payload-Fehler in der Browser-Console.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:15:18 +02:00
boban 3f6f787fd3 Fix: ClamAV starting-State überlebt Reload + kein false-dirty bei untracked
Flag-Datei /tmp/mw-clamav-starting speichert Startzeitpunkt sodass
Spinner + Timer auch nach Seitenreload korrekt weiterläuft.
git_dirty_check filtert jetzt untracked Dateien (??) heraus damit
mailwolt-installer/ und ähnliche nicht fälschlich als dirty gelten.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:11:55 +02:00
boban 6fa77f9f9b Feature: ClamAV Installation direkt aus der UI + install-Befehl im Wrapper
- mailwolt-clamav: install) apt-get install clamav clamav-daemon clamav-freshclam
- ClamavManager: install() Methode + $installing State
- Blade: Installieren-Button wenn nicht installiert (statt nur Text-Hinweis)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:32:30 +02:00
boban b721b7b0df Fix: ensure_system immer am Anfang – sbin kann nie mehr veralten
- ensure_system() jetzt direkt nach git_safe/git_dirty_check aufgerufen
- Sbin wird bei JEDEM Update-Aufruf aktualisiert, nicht nur auf bestimmten Pfaden
- Root-Ursache: alte sbin (v1.0.137, April 23) hatte kein ensure_system → alle
  Fixes in scripts/update.sh wurden nie auf dem Server ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:25:13 +02:00
boban ad85bc0326 Fix: _cleanup überschreibt keinen frisch gebauten Cache mehr
- fix_ownership() getrennt von fix_permissions() (nur chown/chmod, kein optimize)
- _cleanup: bei Erfolg nur fix_ownership, bei Fehler fix_permissions (mit optimize)
- Verhindert dass _cleanup nach erfolgreichem Update den View-Cache wieder löscht

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:20:21 +02:00
boban b83af57e56 Fix: PHP-FPM startet erst nach fix_permissions – kein 404-Fenster mehr
- fix_permissions (chown + optimize) läuft jetzt VOR restart_php_fpm
- config:cache + route:cache aus dem Update-Flow entfernt (fix_permissions/optimize übernimmt das)
- artisan up erfolgt NACH PHP-FPM Restart – App geht erst online wenn alles korrekt ist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:53:19 +02:00
boban 0635d1d9fe Fix: ClamAV in Sidebar + optimize nach optimize:clear – kein 404 nach Update
- dvx.blade.php: Virenschutz-Link (ClamAV) in Sicherheits-Sektion eingefügt
- fix_permissions: optimize:clear + optimize hintereinander – Cache wird nach
  Permissions-Fix neu aufgebaut, kein leerer/fehlender Cache mehr

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:49:12 +02:00
boban a771f97516 Fix: fix_permissions ohne route:cache/config:cache – kein 404/500 mehr nach Update
- Chownt alle App-Verzeichnisse (app, bootstrap, config, db, public, resources, routes, scripts, storage) + Key-Files nach jedem git-Pull
- Entfernt config:cache + route:cache aus fix_permissions (Fehlerquelle für 404/500)
- Nur noch optimize:clear – Laravel lazy-rebuilt Config/Routes beim nächsten Request
- APP_GROUP-Bug korrigiert: optimize:clear lief als APP_GROUP statt APP_USER

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:44:50 +02:00
boban 9d40597842 Fix: npm --cache explizit auf APP_DIR/.npm-cache – kein HOME-Schreibfehler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:39:28 +02:00
boban 140d737231 Fix: npm-Cache-Verzeichnis vor Build dem APP_USER zuweisen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:38:22 +02:00
boban 09f9cf3553 Fix: Frontend-Build-Sicherung + Auto-Rebuild bei fehlendem manifest.json
- frontend_build_quiet: altes public/build/ als .bak sichern,
  bei npm-Fehler wiederherstellen → Site bleibt immer erreichbar
- fix_permissions: wenn manifest.json fehlt, automatisch neu bauen
  → kein manueller Eingriff nach fehlgeschlagenem Update nötig

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:37:44 +02:00
boban 1d18e80749 Fix: fix_permissions in ensure_system – läuft auch mit veraltetem sbin
ensure_system() wird bei JEDEM Update aufgerufen, selbst wenn kein
Code geändert wurde. fix_permissions dort garantiert saubere Rechte
und frischen Cache unabhängig von der sbin-Version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:32:46 +02:00
boban 190b627fd4 Fix: git-Ops als root, fix_permissions immer im Exit-Trap
- git_safe: chown -R APP_DIR immer (kein bedingter Check)
- git_dirty_check + alle git fetch/checkout: als root → kein
  "permission denied" / "dubious ownership" mehr
- _cleanup: fix_permissions() immer aufrufen (auch bei Fehler-Abbruch)
  → kein 404/500 nach fehlgeschlagenem Update mehr

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:30:57 +02:00
boban a119686bfa Fix: git_safe() korrigiert Eigentümer automatisch bei User-Wechsel
chown -R nur wenn APP_DIR nicht dem APP_USER gehört, sonst nur .git.
Verhindert "Your local changes would be overwritten" nach root-Läufen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:25:32 +02:00
boban b107e9a580 Feature: ClamAV-Verwaltung in Sicherheit-Sidebar
- Neue Seite /security/clamav: Status, Aktivieren/Deaktivieren,
  Signatur-Update, RAM-Hinweis, Info-Box
- Optionale Dienste (ClamAV) im Dashboard nur sichtbar wenn aktiv
- mailwolt-clamav sbin-Wrapper + sudoers-Regel in ensure_system

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:21:37 +02:00
boban c16315711d Fix: git_safe() system-level safe.directory + chown .git für APP_USER-Wechsel
Nach APP_USER-Wechsel von mailwolt→www-data schlägt git mit "dubious
ownership" fehl. git config --system schreibt /etc/gitconfig (root),
gilt für alle User. Zusätzlich .git vollständig neu besitzen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:07:58 +02:00
boban a51f271069 Fix: APP_USER default auf www-data – kein 404 mehr nach Update
Artisan-Befehle (config:cache, route:cache, optimize:clear) liefen als
'mailwolt'-User, PHP-FPM läuft als 'www-data' → Cache-Dateien nicht
lesbar → 404 nach jedem Update. Default auf www-data gesetzt damit
beide User übereinstimmen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:55:56 +02:00
boban e0128312cf Fix: fix_permissions baut Cache als www-data + setgid auf cache/storage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:51:30 +02:00
boban c834b5f85d Fix: fix_permissions läuft nach jedem Update-Pfad (kein 404 mehr nach Update)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:46:33 +02:00
boban 7454638506 Fix: bootstrap/cache Rechte nach artisan-Befehlen für www-data freigeben
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:43:38 +02:00
boban f49b92074e Fix: ensure_system installiert mailwolt-ws (Reverb) als systemd-Service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:41:23 +02:00
boban 29566499f9 Fix: artisan cache-Befehle in apply-domains als App-User statt root
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:37:49 +02:00
boban 81f1c9512a Fix: apply-domains mit Backup/Restore + robuster Cert-Erkennung
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:27:36 +02:00
boban 1e053c2bb6 Fix: nginx /ws/ Reverb-Proxy in apply-domains + health:probe-disk --ttl entfernt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:20:03 +02:00
boban 60ebd0ed16 Fix: mailwolt:migrate-env-reverb Command + Update führt Migration immer aus
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 11:01:57 +02:00
boban 093b5a9eea Fix: Update migriert REVERB .env-Werte automatisch auf Domain-Basis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 10:58:06 +02:00
boban becc1bd737 Fix: apply-domains korrigiert alle VITE_REVERB_* und REVERB_* .env-Werte
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 10:55:40 +02:00
boban b59e4c53b4 Fix: mailwolt-apply-domains aktualisiert APP_HOST in .env und baut Assets neu
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 10:50:04 +02:00
boban 996c9c19fe Fix: Laravel Scheduler cron + sudoers für --check-only + CheckUpdates Fallback
- ensure_system() installiert /etc/cron.d/mailwolt für schedule:run
- sudoers: www-data darf mailwolt-update --check-only aufrufen
- CheckUpdates: if/elseif → echter Fallback auf mailwolt-fetch-tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 10:13:05 +02:00
boban 227c623578 Feat: Wartungsseite beim Update statt roher 503
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:13:46 +02:00
boban d60d228012 Fix: mx-Domain bekommt LE-Zertifikat + Postfix/Dovecot werden konfiguriert
- mailwolt-apply-domains: MAIL_HOST wird in ACME-Challenge-Block aufgenommen,
  certbot wird auch für die Mail-Domain ausgeführt, Postfix + Dovecot erhalten
  danach automatisch das neue Zertifikat
- SslCertificatesTable: certbot-Ausgabe korrekt geparst (Einrückung mit Leerzeichen)
- settings-form: "kein Zertifikat nötig" entfernt (Mail-Domain braucht Zertifikat)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:04:02 +02:00
boban 96e2b4d5ab Fix: .git/objects-Rechte werden automatisch repariert (root-Läufe)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:57:29 +02:00
boban 5ec7084cbd Fix: mailwolt-update schreibt jetzt alle Ausgaben in Log-Datei
exec > >(tee -a LOG_FILE) leitet stdout an tee weiter:
- CLI: Ausgabe weiterhin im Terminal + in Log-Datei
- UI (nohup >/dev/null): stdout geht nach /dev/null aber tee
  schreibt trotzdem in die Log-Datei

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:54:09 +02:00
boban 17ed5b18d9 Fix: ensure_system() läuft bei JEDER mailwolt-update Ausführung
Scripts, Sudoers-Regeln und sbin-Binaries werden jetzt immer
aktualisiert — auch wenn kein Update verfügbar ist. Damit entfällt
das manuelle Nachtragen von Sudoers-Regeln nach neuen Releases.

ensure_system() wird aufgerufen:
- Vor jedem "bereits aktuell"-Exit (tags + branch mode)
- Am Ende jedes erfolgreichen Updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:34:09 +02:00
boban 096e983313 Fix: SSL-Cert-Status zeigt 'Fehlt' obwohl Cert vorhanden
Problem: /etc/letsencrypt/archive/ ist chmod 700 (root only).
file_exists() auf Symlinks in live/ schlägt fehl weil Symlink-Ziel
in archive/ nicht lesbar ist. is_dir() auf live/domain/ funktioniert
da das Verzeichnis selbst 755 ist.

- SettingsForm: file_exists() → is_dir() für Existenzcheck
- SettingsForm: openssl-Aufruf via sudo -n (archive/ ist root-only)
- installer.sh + update.sh: sudoers-Regel für openssl auf LE-Cert-Pfade
  (www-data darf nur exakt diesen openssl-Aufruf, keine anderen Pfade)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:27:49 +02:00
boban 880b99f1e0 Fix: git_dirty_check bricht nicht mehr mit rc=2 ab
Auf Produktivservern gibt es fast immer kleine Änderungen (App-generierte
Dateien, Setup-Änderungen). Statt Abbruch: tracked Dateien via git reset
--hard zurücksetzen, untracked Nicht-Systemdateien via git clean entfernen.
.env, storage/ und node_modules/ werden dabei bewusst ausgespart.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:21:45 +02:00
boban 2688b2528b Fix: artisan down ohne --render=errors.503 (View existiert nicht)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:16:49 +02:00