samtap / fang-hacks

Collection of modifications for the XiaoFang WiFi Camera
1.67k stars 340 forks source link

Add RTSP watchdog script #422

Closed gokuu closed 5 years ago

gokuu commented 5 years ago

I've been having a bit of an issue with my cameras when running this where they randomly crash the RTSP server.

This PR adds a watchdog script that check whether the PID described in /var/run/rtsp-server.pid is still alive, and if it isn't, restarts it. It should only restart if the stop command was not invoked, as it will delete the /var/run/rtsp-server.pid file.

This check is performed every 10 seconds