3cky / mbusd

Open-source Modbus TCP to Modbus RTU (RS-232/485) gateway.
BSD 3-Clause "New" or "Revised" License
575 stars 219 forks source link

Support more complex device names #81

Closed rfc1036 closed 2 years ago

rfc1036 commented 2 years ago

Pseudo-patch for the systemd unit:

-ExecStart=/usr/local/sbin/mbusd -d -v1 -L - -c /etc/mbusd-%i.conf -p /dev/%i
+ExecStart=/usr/local/sbin/mbusd -d -v1 -L - -c /etc/mbusd-%i.conf -p /dev/%I

This way if the unit is called mbusd@serial-rs485.service then it will use /dev/serial/rs485.

3cky commented 2 years ago

Done, thanks for the suggestion!