Move tox local restore to app script
This commit is contained in:
parent
96e8e5c796
commit
7a0c054d55
|
@ -75,8 +75,37 @@ function backup_local_tox {
|
|||
fi
|
||||
}
|
||||
|
||||
function restore_local_tox {
|
||||
if [ -d $USB_MOUNT/backup/tox ]; then
|
||||
echo $"Restoring Tox node settings"
|
||||
function_check restore_directory_from_usb
|
||||
restore_directory_from_usb / tox
|
||||
if [ ! "$?" = "0" ]; then
|
||||
function_check set_user_permissions
|
||||
set_user_permissions
|
||||
function_check backup_unmount_drive
|
||||
backup_unmount_drive
|
||||
exit 6393
|
||||
fi
|
||||
cp /var/lib/tox-bootstrapd/tox-bootstrapd.conf /etc/tox-bootstrapd.conf
|
||||
systemctl restart tox-bootstrapd.service
|
||||
if [ ! "$?" = "0" ]; then
|
||||
systemctl status tox-bootstrapd.service
|
||||
function_check set_user_permissions
|
||||
set_user_permissions
|
||||
function_check backup_unmount_drive
|
||||
backup_unmount_drive
|
||||
exit 59369
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function backup_remote_tox {
|
||||
echo ''
|
||||
echo -n ''
|
||||
}
|
||||
|
||||
function restore_remote_tox {
|
||||
echo -n ''
|
||||
}
|
||||
|
||||
function remove_tox_node {
|
||||
|
|
|
@ -1260,6 +1260,7 @@ function restore_apps {
|
|||
for filename in $FILES
|
||||
do
|
||||
app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
|
||||
if [[ $RESTORE_APP == 'all' || $RESTORE_APP == "${app_name}" ]]; then
|
||||
if [[ $(item_in_array ${app_name} ${APPS_COMPLETED[@]}) != 0 ]]; then
|
||||
function_check app_is_installed
|
||||
if [[ "$(app_is_installed $a)" == "1" ]]; then
|
||||
|
@ -1268,6 +1269,7 @@ function restore_apps {
|
|||
restore_local_${app_name}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue