Restoring individual apps

This commit is contained in:
Bob Mottram 2016-10-20 17:01:13 +01:00
parent 83bb146026
commit 1764a32911
2 changed files with 19 additions and 8 deletions

View File

@ -101,7 +101,7 @@ function restore_directory_from_usb {
function restore_configuration {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'configuration' ]]; then
if [[ $RESTORE_APP != 'config' ]]; then
return
fi
fi
@ -715,7 +715,7 @@ restore_certs
restore_personal_settings
restore_mailing_list
restore_email
restore_apps local
restore_apps local $RESTORE_APP
set_user_permissions
backup_unmount_drive

View File

@ -388,6 +388,7 @@ function backup_apps {
function restore_apps {
localremote=$1
RESTORE_APP=$2
RESTORE_APPS_COMPLETED=()
@ -396,12 +397,22 @@ function restore_apps {
for app_name in "${APPS_INSTALLED_NAMES[@]}"
do
echo $"Restoring ${app_name}"
app_load_variables ${app_name}
function_check restore_${localremote}_${app_name}
restore_${localremote}_${app_name}
RESTORE_APPS_COMPLETED+=("${app_name}")
echo $"Restored ${app_name}"
confirm_restore=
if [ ! $2 ]; then
confirm_restore=1
else
if [[ "$RESTORE_APP" == "$app_name" ]]; then
confirm_restore=1
fi
fi
if [ $confirm_restore ]; then
echo $"Restoring ${app_name}"
app_load_variables ${app_name}
function_check restore_${localremote}_${app_name}
restore_${localremote}_${app_name}
RESTORE_APPS_COMPLETED+=("${app_name}")
echo $"Restored ${app_name}"
fi
done
}