mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-06-11 00:34:46 +02:00
44 lines
1.2 KiB
Desktop File
44 lines
1.2 KiB
Desktop File
#Systemd service file template for Py MC - Meshcore Repeater Daemon.
|
|
#Install as /etc/systemd/system/pymc-repeater.service
|
|
|
|
[Unit]
|
|
Description=pyMC Repeater Daemon
|
|
After=network-online.target dbus.socket
|
|
Wants=network-online.target
|
|
Requires=dbus.socket
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=repeater
|
|
Group=repeater
|
|
WorkingDirectory=/var/lib/pymc_repeater
|
|
|
|
# Start command - use venv python to avoid system package conflicts
|
|
ExecStart=/opt/pymc_repeater/venv/bin/python -m repeater.main --config /etc/pymc_repeater/config.yaml
|
|
|
|
# Restart on failure
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
# Allow up to 10s for graceful shutdown before SIGKILL
|
|
TimeoutStopSec=10
|
|
|
|
# Resource limits
|
|
MemoryHigh=256M
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=pymc-repeater
|
|
|
|
# Security (relaxed for service self-restart via sudo)
|
|
ReadWritePaths=/var/log/pymc_repeater /var/lib/pymc_repeater /etc/pymc_repeater
|
|
SupplementaryGroups=plugdev dialout
|
|
|
|
# Allow GPS time sync to update CLOCK_REALTIME without running as root, also allow changing user via polkit or sudo
|
|
CapabilityBoundingSet=CAP_SYS_TIME CAP_SETUID CAP_SETGID
|
|
AmbientCapabilities=CAP_SYS_TIME
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|