Fix: ensure_system installiert mailwolt-ws (Reverb) als systemd-Service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.302
parent
29566499f9
commit
f49b92074e
|
|
@ -177,6 +177,38 @@ ensure_system(){
|
|||
chmod 644 "${cron_file}"
|
||||
echo "[✓] Laravel Scheduler cron installiert."
|
||||
fi
|
||||
|
||||
# Reverb WebSocket Service
|
||||
local ws_service="/etc/systemd/system/mailwolt-ws.service"
|
||||
if [[ ! -f "${ws_service}" ]]; then
|
||||
local php_bin
|
||||
php_bin=$(command -v php || echo "/usr/bin/php")
|
||||
cat > "${ws_service}" <<UNIT
|
||||
[Unit]
|
||||
Description=Laravel Reverb WebSocket (MailWolt)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=${APP_DIR}
|
||||
ExecStart=${php_bin} artisan reverb:start --host=127.0.0.1 --port=8080 --no-interaction
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
User=www-data
|
||||
Group=www-data
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
UNIT
|
||||
systemctl daemon-reload
|
||||
systemctl enable mailwolt-ws
|
||||
systemctl start mailwolt-ws
|
||||
echo "[✓] mailwolt-ws Service installiert und gestartet."
|
||||
elif ! systemctl is-active --quiet mailwolt-ws; then
|
||||
systemctl start mailwolt-ws
|
||||
echo "[✓] mailwolt-ws Service gestartet."
|
||||
fi
|
||||
}
|
||||
|
||||
# -------- Guards --------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue