diff --git a/src/freedombone b/src/freedombone index 669471bf..c5253d4b 100755 --- a/src/freedombone +++ b/src/freedombone @@ -3205,7 +3205,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/mutt ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/mutt/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3240,7 +3240,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/gnupg ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/gnupg/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3275,7 +3275,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/procmail ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/procmail/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3302,7 +3302,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/spamassassin ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/spamassassin/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ -d $USB_MOUNT/backup/spamassassin/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3369,7 +3369,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/ssh ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/ssh/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3414,7 +3414,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/projects ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/projects/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3443,7 +3443,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/personal ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/personal/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ -d $USB_MOUNT/backup/personal/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -3712,7 +3712,7 @@ function create_restore_script { fi echo 'if [ -d $USB_MOUNT/backup/mail ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' for d in $USB_MOUNT/backup/mail/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' freedombone-adduser $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME @@ -4750,7 +4750,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/mutt/' fi echo 'for d in $SERVER_DIRECTORY/backup/mutt/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/mutt/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4783,7 +4783,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/gnupg' fi echo 'for d in $SERVER_DIRECTORY/backup/gnupg/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/gnupg/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4814,7 +4814,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/procmail' fi echo 'for d in $SERVER_DIRECTORY/backup/procmail/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/procmail/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4839,7 +4839,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/spamassassin' fi echo 'for d in $SERVER_DIRECTORY/backup/spamassassin/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/spamassassin/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4898,7 +4898,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/ssh' fi echo 'for d in $SERVER_DIRECTORY/backup/ssh/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/ssh/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4939,7 +4939,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/projects' fi echo 'for d in $SERVER_DIRECTORY/backup/projects/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/projects/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -4966,7 +4966,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/personal' fi echo 'for d in $SERVER_DIRECTORY/backup/personal/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/personal/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME @@ -5262,7 +5262,7 @@ function restore_from_friend { RESTORE_SUBDIR='remoterestore/backup/mail' fi echo 'for d in $SERVER_DIRECTORY/backup/mail/*/ ; do' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME - echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME + echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $6}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ -d $SERVER_DIRECTORY/backup/mail/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME echo ' if [ ! -d /home/$USERNAME ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME