Skip to content

Commit

Permalink
Prevent wd_rtsp.sh from starting multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Apr 10, 2024
1 parent cc891a1 commit cf57c17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/static/static/home/yi-hack/script/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ start_rtsp()
fi
$RTSP_DAEMON -m $MODEL_SUFFIX -r both $RTSP_AUDIO_COMPRESSION $RTSP_PORT $RTSP_USER $RTSP_PASSWORD $B_ONVIF_AUDIO_BC &
fi
(sleep 30; $YI_HACK_PREFIX/script/wd_rtsp.sh >/dev/null) &

WD_COUNT=$(ps | grep wd_rtsp.sh | grep -v grep | grep -c ^)
if [ $WD_COUNT -eq 0 ]; then
(sleep 30; $YI_HACK_PREFIX/script/wd_rtsp.sh >/dev/null) &
fi
}

stop_rtsp()
Expand Down

0 comments on commit cf57c17

Please sign in to comment.