From 685f85c0dadd0b1f91f17ea117ad34655cce4900 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 20 Sep 2021 09:19:46 +1200 Subject: [PATCH] Use systemd-inhibit while recording, if available --- pulserecorder | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pulserecorder b/pulserecorder index a9f4cdc..8ad87c8 100755 --- a/pulserecorder +++ b/pulserecorder @@ -44,6 +44,10 @@ export TMPDIR TMPDIR=$(mktemp -dp "$TMPDIR" parec.XXXXXXXXXX) cleanup_hook rm -r $TMPDIR +if command -v systemd-inhibit >/dev/null; then + systemd-inhibit --who=pulserecorder --why=recording sleep 99d 2>/dev/null & + cleanup_hook kill $! +fi state= outfile= index= clobber=0 for arg in "$@"; do -- 2.39.5