Add support for more complex serial port device names (fixes #81)

This commit is contained in:
Victor Antonovich 2022-02-17 13:12:04 +03:00
parent 55889a7292
commit 7c268600b6
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ The **mbusd** service can be started via:
# systemctl start mbusd@<serial port>.service
where `<serial port>` is serial port device name (like `ttyUSB0`).
where `<serial port>` is escaped serial port device short name (like `ttyUSB0` for `/dev/ttyUSB0` device name or `serial-rs485` for `/dev/serial/rs485` device name).
**mbusd** started by systemd will read its configuration from file named `/etc/mbusd/mbusd-<serial port>.conf`.
This way it's possible to run multiple **mbusd** instances with different configurations.

View File

@ -5,7 +5,7 @@ After=network-online.target
Wants=network-online.target
[Service]
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/mbusd -d -v2 -L - -c @CMAKE_INSTALL_FULL_SYSCONFDIR@/mbusd/mbusd-%i.conf -p /dev/%i
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/mbusd -d -v2 -L - -c @CMAKE_INSTALL_FULL_SYSCONFDIR@/mbusd/mbusd-%i.conf -p /dev/%I
Restart=on-failure
RestartSec=1
StandardOutput=journal