S11configbackup: change visibility to ON of the cloud config backup folder on sd card

This commit is contained in:
Alfonso Gamboa 2023-07-19 13:43:36 -07:00
parent cde9a372fd
commit 5df2944af9

View File

@ -12,40 +12,42 @@ case "$1" in
echo "#####$(basename "$0")#####"
if [ -d /opt/.wz_backup ]; then
if [ -d /opt/wyze_config_backup ]; then
echo "Factory config backup directory missing"
else
echo "Creating factory config backup directory"
mkdir /opt/.wz_backup
mkdir /opt/wyze_config_backup
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
fi
if [ -f /opt/wz_mini/tmp/.T31 ]; then
echo "T31 platform backup"
if [ -d /opt/.wz_backup/configs ]; then
if [ -d /opt/wz_config_backup/configs ]; then
echo "Factory configs backup directory present, not backing up again"
else
echo "Backup /configs"
mount -t jffs2 /dev/mtdblock6 /configs
cp -R /configs/ /opt/.wz_backup/
cp -R /configs/ /opt/wyze_config_backup
umount /configs
fi
elif [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "T20 platform backup"
if [ -d /opt/.wz_backup/configs ]; then
if [ -d /opt/wyze_config_backup/configs ]; then
echo "Factory configs backup directory present, not backing up again"
else
echo "Backup /configs"
mount -t jffs2 /dev/mtdblock8 /configs
cp -R /configs/ /opt/.wz_backup/
cp -R /configs/ /opt/wyze_config_backup/
umount /configs
fi
if [ -d /opt/.wz_backup/params ]; then
if [ -d /opt/wyze_config_backup/params ]; then
echo "Factory params backup directory present, not backing up again"
else
echo "Backup /params"
mount -t jffs2 /dev/mtdblock9 /params
cp -R /params/ /opt/.wz_backup/
cp -R /params/ /opt/wyze_config_backup/
umount /params
fi
fi