From 3433242448b0322e7da5f6b34f0a7c04be2bd131 Mon Sep 17 00:00:00 2001 From: agatha Date: Thu, 18 Jun 2026 08:31:09 -0400 Subject: [PATCH] feat(service): add systemd unit --- ntfy-matrix-bridge.service | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ntfy-matrix-bridge.service diff --git a/ntfy-matrix-bridge.service b/ntfy-matrix-bridge.service new file mode 100644 index 0000000..f184102 --- /dev/null +++ b/ntfy-matrix-bridge.service @@ -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