Single quotes

This commit is contained in:
Bob Mottram 2015-10-25 19:33:28 +00:00
parent 2f5a873257
commit 5a5f1f59a3
1 changed files with 41 additions and 41 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
@ -3181,7 +3181,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/mutt ]; then' >> /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 ' echo "Restoring Mutt settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempmutt mutt/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3213,7 +3213,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/gnupg ]; then' >> /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 ' echo "Restoring gnupg settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempgnupg gnupg/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3245,7 +3245,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/procmail ]; then' >> /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 ' echo "Restoring procmail settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempprocmail procmail/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3269,7 +3269,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/spamassassin ]; then' >> /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 ' echo "Restoring spamassassin settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempspamassassin spamassassin/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3331,7 +3331,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/ssh ]; then' >> /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 ' echo "Restoring ssh keys for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempssh ssh/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3373,7 +3373,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/projects ]; then' >> /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 ' echo "Restoring projects for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempprojects projects/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3399,7 +3399,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/personal ]; then' >> /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 ' echo "Restoring personal settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/temppersonal personal/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3502,7 +3502,7 @@ function create_restore_script {
echo ' chown -R www-data:www-data /var/lib/owncloud/backup' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' chown -R www-data:www-data /var/lib/owncloud/assets' >> /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 ' occ files:scan $USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3624,7 +3624,7 @@ function create_restore_script {
echo " sed -i 's|$FULLBLOG_DOMAIN_NAME.crt|$FULLBLOG_DOMAIN_NAME.bundle.crt|g' /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' fi' >> /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 -n " if [ -d /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/content" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo '/$USERNAME/blog/uncategorized/post ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
@ -3663,7 +3663,7 @@ function create_restore_script {
fi
echo 'if [ -d $USB_MOUNT/backup/mail ]; then' >> /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 ' echo "Restoring emails for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo ' restore_directory_from_usb /root/tempmail mail/$USERNAME' >> /usr/bin/$RESTORE_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
@ -4395,7 +4395,7 @@ function backup_to_friends_servers {
echo '' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' # Social key management' >> /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_fragments ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ $REMOTE_DOMAIN ]; then' >> /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
@ -4995,7 +4995,7 @@ function restore_from_friend {
echo ' chown -R www-data:www-data /var/lib/owncloud/backup' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
echo ' chown -R www-data:www-data /var/lib/owncloud/assets' >> /usr/bin/$RESTORE_FROM_FRIEND_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 ' occ files:scan $USERNAME' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
echo ' fi' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
@ -5105,7 +5105,7 @@ function restore_from_friend {
echo ' fi' >> /usr/bin/$RESTORE_FROM_FRIEND_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 -n " if [ -d /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/content" >> /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
@ -6552,7 +6552,7 @@ function spam_filtering {
# filtering scripts
echo '#!/bin/bash' > /usr/bin/filterspam
echo 'for d in /home/*/ ; do' >> /usr/bin/filterspam
echo ' USERNAME=$(echo "$d" | awk -F "/" "{print $3}")' >> /usr/bin/filterspam
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/filterspam
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/filterspam
echo ' MAILDIR=/home/$USERNAME/Maildir/.learn-spam' >> /usr/bin/filterspam
echo ' if [ ! -d "$MAILDIR" ]; then' >> /usr/bin/filterspam
@ -6574,7 +6574,7 @@ function spam_filtering {
echo '#!/bin/bash' > /usr/bin/filterham
echo 'for d in /home/*/ ; do' >> /usr/bin/filterham
echo ' USERNAME=$(echo "$d" | awk -F "/" "{print $3}")' >> /usr/bin/filterham
echo ' USERNAME=$(echo "$d" | awk -F ''/'' ''{print $3}'')' >> /usr/bin/filterham
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/filterham
echo ' MAILDIR=/home/$USERNAME/Maildir/.learn-ham' >> /usr/bin/filterham
echo ' if [ ! -d "$MAILDIR" ]; then' >> /usr/bin/filterham