Manage dcc-usb-connector auto-stop on removal

This commit is contained in:
2026-03-01 21:47:28 +01:00
parent e48b35ff4e
commit fbfd207fe8
5 changed files with 208 additions and 9 deletions

View File

@@ -1,7 +1,10 @@
[Unit]
Description=DCC USB-to-Network Bridge Daemon
After=network.target
# Device will be available via udev rule, but add condition as safety check
ConditionPathIsReadWrite=/dev/ttyUSB0
# Stop this service when the device is no longer needed (removed)
StopWhenUnneeded=yes
[Service]
ExecStartPre=/usr/bin/stty -F /dev/ttyUSB0 -echo 115200