Compare commits

...

2 Commits

2 changed files with 15 additions and 2 deletions

View File

@ -226,14 +226,18 @@
@livewireScripts
@livewire('wire-elements-modal')
<script>
// 503 (Wartungsmodus) → sofortiger Page-Reload statt Livewire-Fehlerdialog
// 503 (Wartungsmodus) → Reload | 419 (Session abgelaufen) → Login
;(function () {
var _fetch = window.fetch
window.fetch = function () {
return _fetch.apply(this, arguments).then(function (resp) {
if (resp.status === 503) {
window.location.reload()
return new Promise(function () {}) // Livewire-Chain abbrechen
return new Promise(function () {})
}
if (resp.status === 419) {
window.location.href = '{{ route('login') }}'
return new Promise(function () {})
}
return resp
})

View File

@ -224,6 +224,15 @@ ensure_system(){
[[ -f "$f" ]] || continue
_sudoers_add "$f" 'www-data ALL=(root) NOPASSWD: /usr/local/sbin/mailwolt-backup'
done
# RSpamd: Loopback als lokale Adresse eintragen (verhindert 127.0.0.1-Einträge in History)
local rspamd_opts="/etc/rspamd/local.d/options.inc"
if [[ -d /etc/rspamd/local.d ]] && ! grep -q "127.0.0.1" "${rspamd_opts}" 2>/dev/null; then
printf 'local_addrs = [127.0.0.1, ::1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, fd00::/8, 169.254.0.0/16, fe80::/10];\n' \
> "${rspamd_opts}"
systemctl is-active --quiet rspamd && systemctl reload rspamd || true
echo "[✓] RSpamd: local_addrs mit Loopback gesetzt."
fi
# Laravel Scheduler cron (schedule:run muss jede Minute laufen)
local cron_file="/etc/cron.d/mailwolt"
local cron_line="* * * * * www-data php ${APP_DIR}/artisan schedule:run >> /dev/null 2>&1"