Commit Graph

347 Commits (v1.1.348)

Author SHA1 Message Date
boban cae269fae1 Fix: App-Version bevorzugt git-Tag wenn neuer als Version-Datei
Lokalserver zeigte 1.0.137 weil /var/lib/mailwolt/version nie durch
update.sh aktualisiert wurde. git describe --tags liefert immer den
aktuellen Tag direkt aus dem Repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:59:04 +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 7e7d5c1069 Fix: CheckUpdates nutzt exec() statt shell_exec() für --check-only
shell_exec kann auf PHP-FPM Servern deaktiviert sein, wodurch
version_remote nie aktualisiert wurde und kein Update angezeigt wurde.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:36:08 +02:00
boban aaccb4bb32 Fix: optionale Dienste (ClamAV) immer live prüfen statt Monit-Cache
Monit-Cache wurde jede Minute neu befüllt mit altem Status.
Optionale Dienste werden jetzt direkt via systemctl geprüft.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:33:11 +02:00
boban 7ccc7921c1 Fix: health:services Cache nach ClamAV enable/disable leeren
Dashboard zeigte ClamAV bis zu 5 Min. falsch als online/offline weil
der Monit-Cache veraltet war. Cache wird jetzt sofort invalidiert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:29:33 +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 fa65bc1c2e Fix: ClamAV isInstalled() via file_exists statt Hardcode true
Prüft /usr/sbin/clamd und systemd unit-Dateien ohne exec().
Zeigt Install-Button wenn ClamAV nicht installiert ist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:17:24 +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 2331ef74f6 Feat: ClamAV Aktivieren mit Spinner + Sekundentimer bis ClamAV läuft
wire:poll.3s prüft serviceActive() nach Klick. Zeigt laufenden Spinner
mit Sekundenanzeige (0s, 3s, 6s…) bis ClamAV aktiv ist, dann Erfolgsmeldung.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:08:46 +02:00
boban 029d959d51 Fix: ClamAV enable via Queue Job statt shell_exec im Web-Request
nohup/shell_exec wird von PHP-FPM-Prozessgroup nach Request-Ende gekillt.
ClamavEnable Job läuft im Queue-Worker und blockiert nicht den Web-Request.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:00:33 +02:00
boban d0e1d5613c Fix: ClamAV – kein blockierendes Overlay mehr, Spinner nur auf Klick
Vollflächiges wire:loading-Overlay entfernt das beim Seitenaufruf
blockierte. wire:loading.class animate-spin nur noch auf wire:target=refresh
beschränkt damit kein Spinner beim Laden erscheint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:56:59 +02:00
boban 68e7635f6d Fix: ClamAV enable() blockiert nicht mehr – shell_exec + nohup + </dev/null
exec() wartet auch mit & auf Prozessende. shell_exec mit nohup und
stdin-Redirect auf /dev/null stellt echtes Hintergrund-Detaching sicher.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:54:42 +02:00
boban 673e9ec1df Fix: ClamAV enable() – kein Spinner mehr, einfache Textmeldung
$starting-Property, pollStatus() und wire:poll entfernt.
enable() startet ClamAV im Hintergrund und zeigt nur eine
Info-Meldung an – kein dauerhafter Spinner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:53:35 +02:00
boban 0fc6ee81d6 Fix: wire:poll nur innerhalb @if($starting) – kein dauerhafter Poll
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:49:06 +02:00
boban 79b1eeb93c Fix: ClamAV enable non-blocking – Hintergrund-Start + Poll alle 3s
- enable() startet Dienst via nohup im Hintergrund (kein Request-Timeout)
- $starting=true → wire:poll.3s ruft pollStatus() auf
- Overlay zeigt "ClamAV wird gestartet… lädt Viren-DB / bis 60s"
- pollStatus() erkennt wenn Dienst läuft → Overlay weg, Erfolg-Banner

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:44:56 +02:00
boban dc5d8582e1 Fix: ClamAV Feedback – Loading-Overlay + Erfolg/Fehler-Banner inline
- Loading-Overlay über Status-Karte beim Aktivieren/Deaktivieren/Installieren
- $lastSuccess Property für grünen Erfolg-Banner (kein Toast nötig)
- runCmd() helper mit Log für Debugging
- Fehler-Text white-space:pre-wrap für mehrzeilige Ausgaben

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:42:45 +02:00
boban a9ad26757b Fix: installed immer true – Enable/Disable immer sichtbar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:37:10 +02:00
boban 1bcd93908e Fix: isInstalled via systemctl list-unit-files statt Dateipfad-Check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:35:34 +02:00
boban 7d738392b2 Fix: isInstalled() prüft systemd-Unit statt Binary-Pfade
Zuverlässiger auf Servern wo PHP-FPM keinen Zugriff auf /usr/bin hat.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:33:37 +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 7b1274f349 Fix: ClamAV Button-Styles korrigiert + mbx-btn-danger CSS-Klasse
- Aktualisieren + Jetzt: mbx-act-btn (icon-only 28px) → mbx-btn-mute (text+icon)
- Deaktivieren: mbx-act-danger (kein base-style) → mbx-btn-danger (neue Klasse)
- mbx-btn-danger: transparent mit rotem Border/Text, flex align-items:center

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:03:10 +02:00
boban cbdab12c19 UI: ClamAV-Seite Layout verbessert – Sidebar mit RAM-Hinweis + Info
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:59:14 +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 a7f6d8e242 Add: ClamAV in Dashboard-Dienste-Liste
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:15:44 +02:00
boban 3e12d7fd70 Fix: Dashboard zeigt nur die 8 Kern-Dienste (woltguard.dashboard-Liste)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:11:44 +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 3c6325db32 Fix: Dashboard zeigt Dienste auch ohne Monit (Fallback auf systemd/tcp-Probes)
- loadServices() liest Monit-Cache, fällt zurück auf woltguard.php Karten
  mit direkten systemd/tcp-Probes wenn Cache leer ist
- Monit als Dienst in woltguard.php ergänzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:02:51 +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