Venus OS best way to restart a dbus driven service

What is the best-practice to achieve this?

The classical way (I use generally under linux) is using the init sctipt methods or kill -HUP $PID.

How about dbus-driven services under venusos?

Here is an example. I did changes on the serial battery driver settings (utils.py) and do not want to reboot the whole system, just the service dealing with it:

[root@gx:~]# ps | grep batt
 1479 root      1612 S    supervise dbus-serialbattery.ttyUSB2
 1481 root      1756 S    multilog t s25000 n4 /var/log/dbus-serialbattery.ttyUSB2
 1482 root      3048 S    {start-serialbat} /bin/bash /opt/victronenergy/dbus-serialbattery/start-serialbattery.sh ttyUSB2
 1484 root     28600 S    python /opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py /dev/ttyUSB2
 9728 root      2692 S    grep batt

My intention is to do kill -HUP on the python (pid 1484), but think there is dbus specific command and path for this.

If you just want to restart a spesific device that is connected to a USB/serial port (so for serial battery stuff), then just stop and start the serial starter service is what I use.

Somethine like this:

/opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB1
/opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB1

1 Like

Thanks Louis.
How about the dbus driven services in general?