bt-snuggler.service 590 B

12345678910111213141516171819
  1. # On the rpi b it seems like on boot there is a 50% chance that the USB
  2. # bluetooth peripheral will not initialize leaving the system without a
  3. # default bt-controller (peripheral is a UB500 TP-Link BLE 5.0 adapter)
  4. [Unit]
  5. Description=Prevent Radon Eye from starting until bluetooth controller is available.
  6. After=multi-user.target network.target bluetooth.target
  7. Requires=bluetooth.target
  8. [Service]
  9. Type=oneshot
  10. User=radon
  11. RemainAfterExit=yes
  12. WorkingDirectory=/home/radon
  13. ExecStart=/usr/bin/python3 blocker.py
  14. ExecReload=/usr/bin/python3 blocker.py
  15. [Install]
  16. WantedBy=radon-eye.service