- Created systemd/sensorpajen.service user service unit - Uses %h for portability across systems - Loads environment from EnvironmentFile - Auto-restart with bluetooth capabilities - Comprehensive security settings - Created systemd/README.md - Installation instructions - Service management commands - Troubleshooting guide - Log viewing examples - Updated ROADMAP.md to mark Phase 6 complete
31 lines
783 B
Desktop File
31 lines
783 B
Desktop File
[Unit]
|
|
Description=Sensorpajen - Bluetooth Temperature Sensor Monitor
|
|
Documentation=https://github.com/yourusername/sensorpajen
|
|
After=network.target bluetooth.target
|
|
Wants=bluetooth.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=%h/sensorpajen
|
|
EnvironmentFile=%h/sensorpajen/config/sensorpajen.env
|
|
ExecStart=%h/sensorpajen/.venv/bin/python -m sensorpajen.main
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
# Bluetooth capabilities (alternative to setcap)
|
|
# Note: This requires systemd to be run with proper permissions
|
|
# If this doesn't work, use setcap on the Python binary instead
|
|
#AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=sensorpajen
|
|
|
|
# Security
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=default.target
|