Systemd Daemon in Python with watchdog support

I want to write a daemon in python that runs through systemd.

I want to use Type = notify , so I don't need to do double fork magic.

According to the docs:

The reference implementation for this notification is provided by libsystemd-daemon.so

... how to do it with Python?

+4
source share
1 answer

Perhaps you could use the sdnotify python module, which is an implementation of sd_notify . In fact, the protocol is quite simple, so the implementation of the module is quite short.

watchdog, WatchdocSec=<smth> , WATCHDOG=1 . Restart=.

+5

All Articles