mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-15 10:22:17 +02:00
Fix changing dropbox folders (#1705)
This commit is contained in:
@@ -204,20 +204,12 @@ if [ -n "$F_cmd" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ -n "${F_dropboxStillsDir+x}" ]; then
|
if [ -n "${F_dropboxStillsDir+x}" ]; then
|
||||||
F_dropboxStillsDir=$(printf '%b' "${F_dropboxStillsDir//%/\\x}" | sed 's/\//\\\//g')
|
F_dropboxStillsDir=$(printf '%b' "${F_dropboxStillsDir//%/\\x}" | sed 's/\//\\\//g')
|
||||||
if [[ $F_dropboxStillsDir =~ ^/.* ]];then
|
|
||||||
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "\"$F_dropboxStillsDir\""
|
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "\"$F_dropboxStillsDir\""
|
||||||
else
|
|
||||||
rewrite_config /system/sdcard/config/motion.conf dropbox_stills_dir "/\"$F_dropboxStillsDir\""
|
|
||||||
fi
|
|
||||||
echo "dropbox snapshots directory set to $F_dropboxStillsDir<br/>"
|
echo "dropbox snapshots directory set to $F_dropboxStillsDir<br/>"
|
||||||
fi
|
fi
|
||||||
if [ -n "${F_dropboxVideosDir+x}" ]; then
|
if [ -n "${F_dropboxVideosDir+x}" ]; then
|
||||||
F_dropboxVideosDir=$(printf '%b' "${F_dropboxVideosDir//%/\\x}" | sed 's/\//\\\//g')
|
F_dropboxVideosDir=$(printf '%b' "${F_dropboxVideosDir//%/\\x}" | sed 's/\//\\\//g')
|
||||||
if [[ $F_dropboxVideosDir =~ ^/.* ]];then
|
|
||||||
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "\"$F_dropboxVideosDir\""
|
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "\"$F_dropboxVideosDir\""
|
||||||
else
|
|
||||||
rewrite_config /system/sdcard/config/motion.conf dropbox_videos_dir "/\"$F_dropboxVideosDir\""
|
|
||||||
fi
|
|
||||||
echo "dropbox videos directory set to $F_dropboxVideosDir<br/>"
|
echo "dropbox videos directory set to $F_dropboxVideosDir<br/>"
|
||||||
fi
|
fi
|
||||||
if [ -n "${F_motionTriggerLed+x}" ]; then
|
if [ -n "${F_motionTriggerLed+x}" ]; then
|
||||||
@@ -273,7 +265,7 @@ if [ -n "$F_cmd" ]; then
|
|||||||
if [ "$(rtsp_server status)" = "ON" ]; then
|
if [ "$(rtsp_server status)" = "ON" ]; then
|
||||||
echo "Restarting rtsp server"
|
echo "Restarting rtsp server"
|
||||||
rtsp_server off
|
rtsp_server off
|
||||||
rtsp__server on
|
rtsp_server on
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@@ -238,7 +238,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-half">
|
<div class="w3-half">
|
||||||
<label>Dropbox snapshots remote directory</label>
|
<label>Dropbox snapshots remote directory (must start with / )</label>
|
||||||
<input class="w3-input" id="dropboxStillsDir" type="text">
|
<input class="w3-input" id="dropboxStillsDir" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-half">
|
<div class="w3-half">
|
||||||
<label>Dropbox videos remote directory</label>
|
<label>Dropbox videos remote directory (must start with / )</label>
|
||||||
<input class="w3-input" id="dropboxVideosDir" type="text">
|
<input class="w3-input" id="dropboxVideosDir" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user