1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-02 20:52:41 +02:00
Files
Combie81 5548ab554f Moving config entries/cleanup
Moved some configutation options to the config files

Minor text changes

Converted a lot of spaces to tabs
2020-07-16 10:20:39 +02:00

20 lines
763 B
Bash

#!/bin/sh
# Motion detection (must be set before the server starting)
if [ ! -f /system/sdcard/config/motion.conf ]; then
cp /system/sdcard/config/motion.conf.dist /system/sdcard/config/motion.conf
fi
if [ -f /system/sdcard/config/motion.conf ] ; then
. /system/sdcard/config/motion.conf 2>/dev/null
/system/sdcard/bin/setconf -k r -v ${region_of_interest} 2>/dev/null
if [ "$motion_detection" = "off" ]; then
/system/sdcard/bin/setconf -k m -v -1 2>/dev/null
else
/system/sdcard/bin/setconf -k m -v ${motion_sensitivity} 2>/dev/null
fi
/system/sdcard/bin/setconf -k z -v ${motion_indicator_color} 2>/dev/null
/system/sdcard/bin/setconf -k t -v ${motion_tracking} 2>/dev/null
/system/sdcard/bin/setconf -k u -v ${motion_timeout} 2>/dev/null
fi;