|
@@ -476,6 +476,32 @@ function restore_user_config {
|
476
|
476
|
done
|
477
|
477
|
}
|
478
|
478
|
|
|
479
|
+function restore_user_local {
|
|
480
|
+ if [[ $RESTORE_APP != 'all' ]]; then
|
|
481
|
+ if [[ $RESTORE_APP != 'userlocal' ]]; then
|
|
482
|
+ return
|
|
483
|
+ fi
|
|
484
|
+ fi
|
|
485
|
+ for d in $SERVER_DIRECTORY/backup/local/*/ ; do
|
|
486
|
+ USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
|
487
|
+ if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
488
|
+ if [ -d $SERVER_DIRECTORY/backup/local/$USERNAME ]; then
|
|
489
|
+ if [ ! -d /home/$USERNAME ]; then
|
|
490
|
+ ${PROJECT_NAME}-adduser $USERNAME
|
|
491
|
+ fi
|
|
492
|
+ echo $"Restoring local files for $USERNAME"
|
|
493
|
+ restore_directory_from_friend /root/templocal local/$USERNAME
|
|
494
|
+ cp -r /root/templocal/home/$USERNAME/.local /home/$USERNAME/
|
|
495
|
+ if [ ! "$?" = "0" ]; then
|
|
496
|
+ rm -rf /root/templocal
|
|
497
|
+ exit 664
|
|
498
|
+ fi
|
|
499
|
+ rm -rf /root/templocal
|
|
500
|
+ fi
|
|
501
|
+ fi
|
|
502
|
+ done
|
|
503
|
+}
|
|
504
|
+
|
479
|
505
|
function restore_certs {
|
480
|
506
|
if [[ $RESTORE_APP != 'all' ]]; then
|
481
|
507
|
if [[ $RESTORE_APP != 'certs' ]]; then
|
|
@@ -919,6 +945,7 @@ restore_admin_readme
|
919
|
945
|
restore_ipfs
|
920
|
946
|
restore_ssh_keys
|
921
|
947
|
restore_user_config
|
|
948
|
+restore_user_local
|
922
|
949
|
restore_certs
|
923
|
950
|
restore_personal_settings
|
924
|
951
|
restore_mailing_list
|