Formatting shenanigans

This commit is contained in:
Bob Mottram 2015-10-25 19:45:16 +00:00
parent 5a5f1f59a3
commit b319afecdb
1 changed files with 26 additions and 26 deletions

View File

@ -2669,7 +2669,7 @@ function create_backup_script {
echo '# Backup projects' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/projects ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up projects for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2684,7 +2684,7 @@ function create_backup_script {
echo '# Backup personal settings' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/personal ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up personal settings for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2719,7 +2719,7 @@ function create_backup_script {
echo '# Backup gpg keys' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.gnupg ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up gpg keys for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2734,7 +2734,7 @@ function create_backup_script {
echo '# Backup ssh keys' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.ssh ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up ssh keys for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2783,7 +2783,7 @@ function create_backup_script {
echo '# Backup Mutt settings' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -f /home/$USERNAME/.muttrc ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up Mutt settings for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2805,7 +2805,7 @@ function create_backup_script {
echo '# Backup procmail settings' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -f /home/$USERNAME/.procmailrc ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up procmail settings for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2824,7 +2824,7 @@ function create_backup_script {
echo '# Backup spamassassin settings' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.spamassassin ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Backing up spamassassin settings for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2839,7 +2839,7 @@ function create_backup_script {
echo '# Backup email' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/Maildir ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo ' echo "Creating an email archive for $USERNAME"' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -3766,7 +3766,7 @@ function create_restore_script {
echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo 'echo "Setting permissions"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' chown -R $USERNAME:$USERNAME /home/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -4108,7 +4108,7 @@ function backup_to_friends_servers {
echo '# Backup projects' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/projects ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up projects for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4123,7 +4123,7 @@ function backup_to_friends_servers {
echo '# Backup personal settings' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/personal ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up personal settings for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4158,7 +4158,7 @@ function backup_to_friends_servers {
echo '# Backup gpg keys' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.gnupg ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up gpg keys for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4173,7 +4173,7 @@ function backup_to_friends_servers {
echo '# Backup ssh keys' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.ssh ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up ssh keys for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4222,7 +4222,7 @@ function backup_to_friends_servers {
echo '# Backup Mutt settings' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -f /home/$USERNAME/.muttrc ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up Mutt settings for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4244,7 +4244,7 @@ function backup_to_friends_servers {
echo '# Backup procmail settings' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -f /home/$USERNAME/.procmailrc ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up procmail settings for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4263,7 +4263,7 @@ function backup_to_friends_servers {
echo '# Backup spamassassin settings' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/.spamassassin ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Backing up spamassassin settings for $USERNAME"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4278,7 +4278,7 @@ function backup_to_friends_servers {
echo '# Backup email' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; do' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ -d /home/$USERNAME/Maildir ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' echo "Creating an email archive"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -4692,7 +4692,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/mutt/'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring Mutt settings for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4722,7 +4722,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/gnupg'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring gnupg settings for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4750,7 +4750,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/procmail'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring procmail settings for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4772,7 +4772,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/spamassassin'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring spamassassin settings for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4828,7 +4828,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/ssh'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring ssh keys for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4866,7 +4866,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/projects'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring projects for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -4890,7 +4890,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/personal'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring personal settings for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -5183,7 +5183,7 @@ function restore_from_friend {
RESTORE_SUBDIR='remoterestore/backup/mail'
fi
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /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 ' echo "Restoring emails for $USERNAME"' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -5220,7 +5220,7 @@ function restore_from_friend {
if [[ $ENABLE_SOCIAL_KEY_MANAGEMENT == "yes" ]]; then
echo '' >> /usr/bin/$RESTORE_FROM_FRIENDS_SCRIPT_NAME
echo 'for d in /home/*/ ; 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 $3}'"'"')' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
echo ' # Retrieve key fragments for $USERNAME' >> /usr/bin/$RESTORE_FROM_FRIENDS_SCRIPT_NAME
echo -n ' /usr/bin/sshpass -p $REMOTE_PASSWORD ' >> /usr/bin/$RESTORE_FROM_FRIENDS_SCRIPT_NAME