restart ustreamer for v4p

This commit is contained in:
Maxim Devaev 2024-03-26 18:52:27 +02:00
parent 4cec632a37
commit e904bc467e

View File

@ -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