mirror of
https://github.com/chatmail/relay.git
synced 2026-05-14 01:44:38 +00:00
Correct the systemd unit modifications in 98bc1503 that lead to startup failures in some instances. Switch to After+Wants = network-online.target and add RestartSec=2s to give late-binding more interfaces time to appear. In the deployer, capture the files.template() return value and appropriately set need_restart and daemon_reload.
14 lines
337 B
Django/Jinja
14 lines
337 B
Django/Jinja
[Unit]
|
|
Description=mtail
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/bin/sh -c "journalctl -f -o short-iso -n 0 | /usr/local/bin/mtail --address={{ address }} --port={{ port }} --progs /etc/mtail --logtostderr --logs -"
|
|
Restart=on-failure
|
|
RestartSec=2s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|