1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-03 05:02:40 +02:00

Fix controlscripts/rtsp (#1701)

- stopping rtsp will stop its dependents properly
This commit is contained in:
yerlandinata
2021-03-09 02:54:02 +07:00
committed by GitHub
parent 74575379b0
commit bae6374a42

View File

@@ -20,6 +20,7 @@ fi
if [ -z "${CODEC+x}" ]; then
CODEC="H264"
fi
status()
{
pid="$(cat "$PIDFILE" 2>/dev/null)"
@@ -97,10 +98,17 @@ start()
fi
}
# now the .pid file will now be removed and you can start it again from the web UI
stop_dependents()
{
/system/sdcard/controlscripts/recording stop
}
stop()
{
pid="$(cat "$PIDFILE" 2>/dev/null)"
if [ "$pid" ]; then
stop_dependents
kill "$pid"
rm "$PIDFILE" 1> /dev/null 2>&1
fi