Example setup for a pydbus service controllable via systemctl.
git clone https://github.com/sezanzeb/systemd-pydbus-example
cd systemd-pydbus-example
sudo python3 setup.py install
sudo systemctl daemon-reload
sudo systemctl start systemd-pydbus-example
The service is now running with root permissions and ready to receive messages. Communicate with the server using the client:
systemd-pydbus-example-client --message hello
The service should have received the message and "hello" should now be visible in:
systemctl status systemd-pydbus-example
.service files
pydbus
PYTHONUNBUFFERED
Public Domain, do whatever you want with this code.