I am searching for a way to prevent shutdown/standby when tvheadend (or vdr) is currently recording.
What I found so far:
Prevent shutdown when rsnapshot is running:
Which I don't like because it requires tvheadend to have root privileges and the link referenced seems to provide variants which do not work any more.
Setting Wake up time works fine. But pm-suspend does not check if a KDE session is active but instantly suspends.
How can I make shutdown not require admin password?:
works only for a very special case: checks if users are logged in
I see two solutions:
- Either TVHeadend script calls some KDE functions to ask for KDE state (screen locked, user logged in etc) and issues shutdown/suspend calls as seen in the above example.
- or modify the shutdown behavior of KDE so it checks if any TVH recording is currently active.
I cannot find any docs about these two variants.