feat(service): add systemd unit
This commit is contained in:
19
ntfy-matrix-bridge.service
Normal file
19
ntfy-matrix-bridge.service
Normal 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
|
||||
Reference in New Issue
Block a user