12 lines
222 B
Bash
Executable File
12 lines
222 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
if hash systemd-inhibit 2>/dev/null; then
|
|
systemd-inhibit \
|
|
--who=waitfor \
|
|
--why="Awaiting PID $1" \
|
|
tail --pid="$1" -f /dev/null
|
|
else
|
|
tail --pid="$1" -f /dev/null
|
|
fi
|