improved kvmd-udev-restart-pass

This commit is contained in:
Maxim Devaev 2024-03-31 14:02:33 +03:00
parent 5bdc998922
commit d082f05e7a
2 changed files with 5 additions and 3 deletions

View File

@ -114,6 +114,9 @@ depends=(
# fsck for /boot
dosfstools
# pgrep for kvmd-udev-restart-pass
procps-ng
# Misc
hostapd
)

View File

@ -45,9 +45,8 @@ if [ "$port" = "HDMI-A-1" ]; then
if systemctl is-enabled -q kvmd-pass; then
systemctl restart kvmd-pass || true
fi
pid=$(pidof ustreamer || echo 0)
if [ "$pid" -ne 0 ]; then
for pid in $(pgrep -f '^kvmd/streamer: ' || true); do
kill "$pid" || true
fi
done
fi
fi