diff options
author | Maxim Devaev <[email protected]> | 2024-03-26 18:52:27 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-03-26 20:18:16 +0200 |
commit | e904bc467e611a0a6c70aa690de75b0d49543aed (patch) | |
tree | 0f3570e16e9d35c9a0ad7d75921ee9cb322b5d47 | |
parent | 4cec632a3757f67330f05aa341e4ae6aba25b2e7 (diff) |
restart ustreamer for v4p
-rwxr-xr-x | scripts/kvmd-udev-restart-pass | 10 |
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 |