Loading

Paste #pskxftzrj

  1. Udev rule:
  2. SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct} == "2303", TAG+="systemd", ENV{SYSTEMD_WANTS} = "serial-gateway@%k.service"
  3.  
  4. Systemd unit: -------------------------------
  5.  
  6. [Unit]
  7. Requires=dev-%i.device
  8. After=dev-%i.device
  9. BindsTo=dev-%i.device
  10.  
  11. [Service]
  12. Type=simple
  13. User=nobody
  14. Group=dialout
  15. Restart=on-failure
  16. ExecStart=/usr/bin/socat -d -d -d -d tcp-l:7236,reuseaddr,range=131.169.132.90/32 file:/dev/%i,nonblock,echo=0
  17. SuccessExitStatus=143 SIGKILL