feat(service): add systemd unit

This commit is contained in:
2026-06-18 08:31:09 -04:00
parent 2706aa9301
commit 3433242448

View File

@@ -0,0 +1,19 @@
[Unit]
Description=ntfy -> Matrix bridge
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=ntfybridge
WorkingDirectory=/opt/ntfy-matrix-bridge
# Keep the token out of the config file by passing it in here (chmod 600 the
# unit, or use an EnvironmentFile=/etc/ntfy-matrix-bridge.env instead).
Environment=MATRIX_ACCESS_TOKEN=replace-me
# EnvironmentFile=/etc/ntfy-matrix-bridge.env
ExecStart=/opt/ntfy-matrix-bridge/venv/bin/python /opt/ntfy-matrix-bridge/bridge.py --config /opt/ntfy-matrix-bridge/config.yaml
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target