mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-27 07:37:19 +00:00
Fix S11configbackup doesn't generate BACKUP_THESE_FILES.md file
This commit is contained in:
parent
323c071a6d
commit
e327633e5f
@ -12,17 +12,25 @@ case "$1" in
|
|||||||
|
|
||||||
echo "#####$(basename "$0")#####"
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
|
||||||
if df / | grep -q overlayfs; then
|
if df / | grep -q overlayfs; then
|
||||||
mkdir -p /sdcard/wyze_config_backup
|
if [ -d /sdcard/wyze_config_backup ]; then
|
||||||
mkdir -p /opt/wyze_config_backup
|
echo "Factory config backup directory exists"
|
||||||
mount --bind /sdcard/wyze_config_backup /opt/wyze_config_backup
|
else
|
||||||
|
echo "Creating factory config backup directory"
|
||||||
|
mkdir /sdcard/wyze_config_backup
|
||||||
|
fi
|
||||||
|
ln -s /sdcard/wyze_config_backup /opt/wyze_config_backup
|
||||||
|
else
|
||||||
|
if [ -d /opt/wyze_config_backup ]; then
|
||||||
|
echo "Factory config backup directory exists"
|
||||||
|
else
|
||||||
|
echo "Creating factory config backup directory"
|
||||||
|
mkdir /opt/wyze_config_backup
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d /opt/wyze_config_backup ]; then
|
if ! [ -f /opt/wyze_config_backup/BACKUP_THESE_FILES.md ]; then
|
||||||
echo "Factory config backup directory exists"
|
|
||||||
else
|
|
||||||
echo "Creating factory config backup directory"
|
|
||||||
mkdir /opt/wyze_config_backup
|
|
||||||
touch /opt/wyze_config_backup/BACKUP_THESE_FILES.md
|
touch /opt/wyze_config_backup/BACKUP_THESE_FILES.md
|
||||||
echo "These files are the cloud credentials unique to your camera. Back them up in case your camera's flash becomes corrupted. The camera will NEVER connect to the cloud if they are wiped from the camera." > /opt/wyze_config_backup/BACKUP_THESE_FILES.md
|
echo "These files are the cloud credentials unique to your camera. Back them up in case your camera's flash becomes corrupted. The camera will NEVER connect to the cloud if they are wiped from the camera." > /opt/wyze_config_backup/BACKUP_THESE_FILES.md
|
||||||
fi
|
fi
|
||||||
@ -59,7 +67,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if df / | grep -q overlayfs; then
|
if df / | grep -q overlayfs; then
|
||||||
umount /opt/wyze_config_backup
|
rm /opt/wyze_config_backup
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user