Is it possible to restart a systemd service when there is no output generated for a predefined amount of time?
I have a script which apparently can hang, but that is not detected by systemd (or Python for that case), and thus it does not enter the failed state.
However, it does stop logging output, so I should be able to restart the service after no output is given for a minute. Is this possible with systemd?
My current systemd file:
[Unit] Description=SOmething After=network.target [Service] WorkingDirectory=/home/user/system/something User=nobody ExecStart=/usr/bin/python2 something.py Restart=on-watchdog RestartSec=10s [Install] WantedBy=multi-user.target