[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 ExecStart=/usr/bin/bash -c "/usr/bin/ncat -n -k -l 2560 /dev/ttyUSB0" KillMode=mixed TimeoutStopSec=5 PrivateTmp=true [Install] WantedBy=default.target