Commit Graph

20 Commits (60ebd0ed16e2b2564a48ea918d0b1f42f58a84ca)

Author SHA1 Message Date
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
boban ae3b1e6b14 Fix: Update-Check Bootstrap — --check-only Flag in mailwolt-update
Problem: Henne-Ei-Situation — alte Server haben alte CheckUpdates.php die
  git fetch als www-data aufruft (schlägt wegen fehlender Credentials fehl).
  Neue mailwolt-fetch-tags Helper sind noch nicht deployed.

Lösung:
- scripts/update.sh: --check-only Flag — ruft nur git ls-remote als App-User
  auf, schreibt version_remote, beendet sich sofort (kein Update)
- update.sh: schreibt version_remote auch nach normalem Tag-Fetch (damit es
  nach manuellen Updates aktuell bleibt)
- CheckUpdates.php: sichere Fallback-Kette:
  1. mailwolt-update --check-only (nur wenn Skript das Flag kennt — kein
     versehentliches Triggern auf alten Servern)
  2. mailwolt-fetch-tags (ab v1.1.268)
  3. lokale git tags (letzter Fallback)
  + version_remote wird nur verwendet wenn < 2h alt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:13:32 +02:00
boban c4a2f33293 Fix: Update-Check via mailwolt-fetch-tags + Fehlerdetails in Settings-Toast
- Neu: scripts/mailwolt-fetch-tags ruft git ls-remote als App-User auf (hat Credentials),
  schreibt neuesten Tag nach /var/lib/mailwolt/version_remote
- CheckUpdates.php nutzt jetzt sudo mailwolt-fetch-tags statt direktem git fetch als www-data
  (www-data hat keine Git-Credentials für private Repos)
- SettingsForm.php zeigt tatsächliche Fehlerzeilen ([!], error, failed) im Toast statt
  generischer "fehlgeschlagen"-Meldung
- installer.sh + update.sh installieren mailwolt-fetch-tags nach /usr/local/sbin/
- update.sh trägt mailwolt-fetch-tags automatisch in sudoers nach (Upgrade-Pfad)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 07:46:18 +02:00
boban 831f656b54 Fix: mailwolt-apply-domains — dig-Fallback + fertig-Echo
- certbot_safe(): dig ist auf Ubuntu nicht immer installiert (kein dnsutils).
  Mit set -euo pipefail crashte die Funktion lautlos → certbot nie ausgeführt.
  Fallback auf getent ahostsv6 wenn dig fehlt; Zuweisung mit || has_aaaa=""
  damit set -e nicht greift falls beide Befehle scheitern.

- echo "mailwolt-apply-domains fertig" am Ende: SettingsForm.php prüft ob
  "fertig" im Output steht um ssl_configured=1 zu setzen — ohne diesen Echo
  wurde SSL nie als konfiguriert markiert, selbst wenn Zertifikate vorhanden.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 07:26:44 +02:00
boban 5511498200 Refactor: update.sh nach scripts/ verschoben
Alle Scripts zentral unter scripts/:
- scripts/update.sh (war update.sh)
- scripts/mailwolt-apply-domains

installer.sh und update.sh selbst auf neuen Pfad angepasst.

Update laufender Server (einmalig):
  sudo install -m 755 /var/www/mailwolt/scripts/update.sh /usr/local/sbin/mailwolt-update
  sudo install -m 755 /var/www/mailwolt/scripts/mailwolt-apply-domains /usr/local/sbin/mailwolt-apply-domains

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 07:04:37 +02:00
boban 05cc53ef49 Refactor: mailwolt-apply-domains als eigenständige Datei im Repo
Script aus installer.sh-Heredoc in scripts/mailwolt-apply-domains ausgelagert.
installer.sh kopiert es jetzt via install -m 755 statt Heredoc.

Vorteile:
- git pull + sudo cp reicht um das Script auf laufenden Servern zu aktualisieren
- Keine doppelte Pflege mehr (Heredoc vs. Datei)
- Änderungen direkt im Script-File sichtbar (git diff)

Update laufender Server:
  sudo install -m 755 /var/www/mailwolt/scripts/mailwolt-apply-domains \
    /usr/local/sbin/mailwolt-apply-domains

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:20:09 +02:00
boban 2e59e65eb6 Remove istaller form Laravel 2025-10-16 10:39:58 +02:00
boban 8bd603733f Init Mailwolt Installer 2025-10-16 10:33:51 +02:00