1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-08 15:10:45 +02:00

Add directory to group daily stills/videos + mqtt-control upgrades (#1196)

* Added mqtt-control to play sound from /system/sdcard/media

* Turn amber light before recording

* detectionOn code cleanup and unification

* Resize and compress mqtt snapshot

* Send still/video to SMB

* Fixed a+x rights in bin/

* Added openRTSP - enables recording real video on detectionOn

* Added groupname to store files in dir/file structure

* Non-safe env var usage... but unified

* remove mqtt-control PID on stop() even if no kill was made

* mqtt-control kill + rm based on another script

* mqtt-control wait for connection available to be established
This commit is contained in:
Seweryn Zeman
2019-10-16 12:30:28 +02:00
committed by jmtatsch
parent 26292e37f6
commit 281d027935
4 changed files with 69 additions and 34 deletions

View File

@@ -34,10 +34,12 @@ start()
stop()
{
pid="$(cat "$PIDFILE" 2>/dev/null)"
current=$(status)
if [ "$pid" ]; then
kill "$pid" && rm "$PIDFILE"
killall mosquitto_sub 2>/dev/null
killall mosquitto_sub.bin 2>/dev/null
kill "$pid"
rm "$PIDFILE" 1> /dev/null 2>&1
killall mosquitto_sub 2>/dev/null
killall mosquitto_sub.bin 2>/dev/null
fi
}