[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