I have implemented a dbus Python service which works fine within the terminal but starting it as a service fails.
- dbus code from https://github.com/victronenergy/velib_python/blob/master/dbusdummyservice.py to file dbus-dummy.py at /data/dbus-dummy.
- ve_utils.py and vedbus.py in /data/dbus-dummy
- "run" start script in the /data/dbus-dummy/service folder (chmod 755).
- symbolic link: "ln -s /data/dbus-dummy/service /service/dbus-dummy"
The service starts and is terminate within the same second;
"svstat /service/dbus-dummy" shows restarts every second with new PIDs:
root@raspberrypi2:~# svstat /service/dbus-dummy
/service/dbus-dummy: up (pid 24314) 0 seconds
root@raspberrypi2:~# svstat /service/dbus-dummy
/service/dbus-dummy: up (pid 24325) 0 seconds
....
The service works well when started in the terminal:
python /data/dbus-dummy/dbus-dummy.py
The dbus-spy shows a new service: com.victronenergy.dummyservice.ttyO1
Environment:
Venus/Raspberry v 2.89
I would be happy about any ideas or hints!