|
@@ -121,7 +121,7 @@ function unmount_drive {
|
121
|
121
|
echo $"Setting permissions"
|
122
|
122
|
for d in /home/*/ ; do
|
123
|
123
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
124
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
124
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
125
|
125
|
chown -R $USERNAME:$USERNAME /home/$USERNAME
|
126
|
126
|
fi
|
127
|
127
|
done
|
|
@@ -395,7 +395,7 @@ function restore_mutt_settings {
|
395
|
395
|
if [ -d $USB_MOUNT/backup/mutt ]; then
|
396
|
396
|
for d in $USB_MOUNT/backup/mutt/*/ ; do
|
397
|
397
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
398
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
398
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
399
|
399
|
if [ ! -d /home/$USERNAME ]; then
|
400
|
400
|
${PROJECT_NAME}-adduser $USERNAME
|
401
|
401
|
fi
|
|
@@ -427,7 +427,7 @@ function restore_gpg {
|
427
|
427
|
if [ -d $USB_MOUNT/backup/gnupg ]; then
|
428
|
428
|
for d in $USB_MOUNT/backup/gnupg/*/ ; do
|
429
|
429
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
430
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
430
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
431
|
431
|
if [ ! -d /home/$USERNAME ]; then
|
432
|
432
|
${PROJECT_NAME}-adduser $USERNAME
|
433
|
433
|
fi
|
|
@@ -461,7 +461,7 @@ function restore_procmail {
|
461
|
461
|
if [ -d $USB_MOUNT/backup/procmail ]; then
|
462
|
462
|
for d in $USB_MOUNT/backup/procmail/*/ ; do
|
463
|
463
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
464
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
464
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
465
|
465
|
if [ ! -d /home/$USERNAME ]; then
|
466
|
466
|
${PROJECT_NAME}-adduser $USERNAME
|
467
|
467
|
fi
|
|
@@ -488,7 +488,7 @@ function restore_spamassassin {
|
488
|
488
|
if [ -d $USB_MOUNT/backup/spamassassin ]; then
|
489
|
489
|
for d in $USB_MOUNT/backup/spamassassin/*/ ; do
|
490
|
490
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
491
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
491
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
492
|
492
|
if [ -d $USB_MOUNT/backup/spamassassin/$USERNAME ]; then
|
493
|
493
|
if [ ! -d /home/$USERNAME ]; then
|
494
|
494
|
${PROJECT_NAME}-adduser $USERNAME
|
|
@@ -564,7 +564,7 @@ function restore_user_ssh_keys {
|
564
|
564
|
if [ -d $USB_MOUNT/backup/ssh ]; then
|
565
|
565
|
for d in $USB_MOUNT/backup/ssh/*/ ; do
|
566
|
566
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
567
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
567
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
568
|
568
|
if [ ! -d /home/$USERNAME ]; then
|
569
|
569
|
${PROJECT_NAME}-adduser $USERNAME
|
570
|
570
|
fi
|
|
@@ -591,7 +591,7 @@ function restore_user_config {
|
591
|
591
|
if [ -d $USB_MOUNT/backup/config ]; then
|
592
|
592
|
for d in $USB_MOUNT/backup/config/*/ ; do
|
593
|
593
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
594
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
594
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
595
|
595
|
if [ ! -d /home/$USERNAME ]; then
|
596
|
596
|
${PROJECT_NAME}-adduser $USERNAME
|
597
|
597
|
fi
|
|
@@ -618,7 +618,7 @@ function restore_user_fin {
|
618
|
618
|
if [ -d $USB_MOUNT/backup/fin ]; then
|
619
|
619
|
for d in $USB_MOUNT/backup/fin/*/ ; do
|
620
|
620
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
621
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
621
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
622
|
622
|
if [ ! -d /home/$USERNAME ]; then
|
623
|
623
|
${PROJECT_NAME}-adduser $USERNAME
|
624
|
624
|
fi
|
|
@@ -645,7 +645,7 @@ function restore_user_local {
|
645
|
645
|
if [ -d $USB_MOUNT/backup/local ]; then
|
646
|
646
|
for d in $USB_MOUNT/backup/local/*/ ; do
|
647
|
647
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
648
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
648
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
649
|
649
|
if [ ! -d /home/$USERNAME ]; then
|
650
|
650
|
${PROJECT_NAME}-adduser $USERNAME
|
651
|
651
|
fi
|
|
@@ -715,7 +715,7 @@ function restore_personal_settings {
|
715
|
715
|
if [ -d $USB_MOUNT/backup/personal ]; then
|
716
|
716
|
for d in $USB_MOUNT/backup/personal/*/ ; do
|
717
|
717
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
718
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
718
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
719
|
719
|
if [ -d $USB_MOUNT/backup/personal/$USERNAME ]; then
|
720
|
720
|
if [ ! -d /home/$USERNAME ]; then
|
721
|
721
|
${PROJECT_NAME}-adduser $USERNAME
|
|
@@ -862,7 +862,7 @@ function restore_owncloud {
|
862
|
862
|
chown root:root $OWNCLOUD_PATH/config/config.php
|
863
|
863
|
for d in /home/*/ ; do
|
864
|
864
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
865
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
865
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
866
|
866
|
$OWNCLOUD_PATH/occ files:scan $USERNAME
|
867
|
867
|
fi
|
868
|
868
|
done
|
|
@@ -996,7 +996,7 @@ function restore_blog {
|
996
|
996
|
fi
|
997
|
997
|
for d in /home/*/ ; do
|
998
|
998
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
999
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
999
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
1000
|
1000
|
if [ -d /var/www/${FULLBLOG_DOMAIN_NAME}/htdocs/content/$USERNAME/blog/uncategorized/post ]; then
|
1001
|
1001
|
mv /var/www/${FULLBLOG_DOMAIN_NAME}/htdocs/content/$USERNAME/blog/*.md /var/www/${FULLBLOG_DOMAIN_NAME}/htdocs/content/$USERNAME/blog/uncategorized/post
|
1002
|
1002
|
fi
|
|
@@ -1037,7 +1037,7 @@ function restore_email {
|
1037
|
1037
|
if [ -d $USB_MOUNT/backup/mail ]; then
|
1038
|
1038
|
for d in $USB_MOUNT/backup/mail/*/ ; do
|
1039
|
1039
|
USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
|
1040
|
|
- if [[ $USERNAME != "git" && $USRNAME != "mirrors" ]]; then
|
|
1040
|
+ if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
1041
|
1041
|
if [ ! -d /home/$USERNAME ]; then
|
1042
|
1042
|
${PROJECT_NAME}-adduser $USERNAME
|
1043
|
1043
|
fi
|