Files
pyMC_Repeater/openhop-repeater.service
T
2026-06-24 23:27:49 +01:00

44 lines
1.2 KiB
Desktop File

#Systemd service file template for openHop - Meshcore Repeater Daemon.
#Install as /etc/systemd/system/openhop-repeater.service
[Unit]
Description=openHop 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/openhop_repeater
# Start command - use venv python to avoid system package conflicts
ExecStart=/opt/openhop_repeater/venv/bin/python -m repeater.main --config /etc/openhop_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=openhop-repeater
# Security (relaxed for service self-restart via sudo)
ReadWritePaths=/var/log/openhop_repeater /var/lib/openhop_repeater /etc/openhop_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