summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-26 18:52:27 +0200
committerMaxim Devaev <[email protected]>2024-03-26 20:18:16 +0200
commite904bc467e611a0a6c70aa690de75b0d49543aed (patch)
tree0f3570e16e9d35c9a0ad7d75921ee9cb322b5d47
parent4cec632a3757f67330f05aa341e4ae6aba25b2e7 (diff)
restart ustreamer for v4p
-rwxr-xr-xscripts/kvmd-udev-restart-pass10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/kvmd-udev-restart-pass b/scripts/kvmd-udev-restart-pass
index 52e2c740..870896fa 100755
--- a/scripts/kvmd-udev-restart-pass
+++ b/scripts/kvmd-udev-restart-pass
@@ -40,14 +40,18 @@ test -n "$port"
if [ "$port" = "HDMI-A-1" ]; then
- if systemctl is-enabled -q kvmd-pass; then
- status=$(head -n 1 "/sys/class/drm/$card-$port/status")
- if [ "$status" = "connected" ]; then
+ status=$(head -n 1 "/sys/class/drm/$card-$port/status")
+ if [ "$status" = "connected" ]; then
+ if systemctl is-enabled -q kvmd-pass; then
systemctl restart kvmd-pass || true
pid=$(pidof ustreamer || echo 0)
if [ "$pid" -ne 0 ]; then
kill "$pid" || true
fi
fi
+ pid=$(pidof ustreamer || echo 0)
+ if [ "$pid" -ne 0 ]; then
+ kill "$pid" || true
+ fi
fi
fi