tools -> scripts

This commit is contained in:
2025-11-14 10:44:57 +08:00
parent 0493f18b18
commit c7449f4acb
70 changed files with 369 additions and 2 deletions

13
scripts/utils/waitfor Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
set -u
set -o 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