| 
				
			 | 
			
			
				@@ -35,6 +35,8 @@ PROJECT_NAME='freedombone' 
			 | 
		
	
		
			
			| 
				35
			 | 
			
				35
			 | 
			
			
				 export TEXTDOMAIN=${PROJECT_NAME}-remote 
			 | 
		
	
		
			
			| 
				36
			 | 
			
				36
			 | 
			
			
				 export TEXTDOMAINDIR="/usr/share/locale" 
			 | 
		
	
		
			
			| 
				37
			 | 
			
				37
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				38
			 | 
			
			
				+CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg 
			 | 
		
	
		
			
			| 
				
			 | 
			
				39
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				38
			 | 
			
				40
			 | 
			
			
				 # User to create the list for 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				41
			 | 
			
			
				 MY_USERNAME=$USER 
			 | 
		
	
		
			
			| 
				40
			 | 
			
				42
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -42,7 +44,14 @@ MY_USERNAME=$USER 
			 | 
		
	
		
			
			| 
				42
			 | 
			
				44
			 | 
			
			
				 FRIENDS_SERVERS_LIST= 
			 | 
		
	
		
			
			| 
				43
			 | 
			
				45
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				44
			 | 
			
				46
			 | 
			
			
				 # Minimum password length in characters 
			 | 
		
	
		
			
			| 
				45
			 | 
			
				
			 | 
			
			
				-MINIMUM_PASSWORD_LENGTH=8 
			 | 
		
	
		
			
			| 
				
			 | 
			
				47
			 | 
			
			
				+MINIMUM_PASSWORD_LENGTH=10 
			 | 
		
	
		
			
			| 
				
			 | 
			
				48
			 | 
			
			
				+if [ -f /usr/local/bin/${PROJECT_NAME} ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				49
			 | 
			
			
				+	MINIMUM_PASSWORD_LENGTH=$(cat /usr/local/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				50
			 | 
			
			
				+else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				51
			 | 
			
			
				+	if [ -f /usr/bin/${PROJECT_NAME} ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+		MINIMUM_PASSWORD_LENGTH=$(cat /usr/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				53
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				54
			 | 
			
			
				+fi 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				55
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				47
			 | 
			
				56
			 | 
			
			
				 # How many remote locations were specified 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				57
			 | 
			
			
				 entering_remote_backups_ctr=0 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -78,61 +87,61 @@ do 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				87
			 | 
			
			
				 key="$1" 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				88
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				80
			 | 
			
				89
			 | 
			
			
				 case $key in 
			 | 
		
	
		
			
			| 
				81
			 | 
			
				
			 | 
			
			
				-    -h|--help) 
			 | 
		
	
		
			
			| 
				82
			 | 
			
				
			 | 
			
			
				-    show_help 
			 | 
		
	
		
			
			| 
				83
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				84
			 | 
			
				
			 | 
			
			
				-    # backup list filename 
			 | 
		
	
		
			
			| 
				85
			 | 
			
				
			 | 
			
			
				-    # typically /home/$USER/backup.list 
			 | 
		
	
		
			
			| 
				86
			 | 
			
				
			 | 
			
			
				-    -l|--list) 
			 | 
		
	
		
			
			| 
				87
			 | 
			
				
			 | 
			
			
				-    shift 
			 | 
		
	
		
			
			| 
				88
			 | 
			
				
			 | 
			
			
				-    FRIENDS_SERVERS_LIST="$1" 
			 | 
		
	
		
			
			| 
				89
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				90
			 | 
			
				
			 | 
			
			
				-    # username within /home 
			 | 
		
	
		
			
			| 
				91
			 | 
			
				
			 | 
			
			
				-    -u|--user) 
			 | 
		
	
		
			
			| 
				92
			 | 
			
				
			 | 
			
			
				-    shift 
			 | 
		
	
		
			
			| 
				93
			 | 
			
				
			 | 
			
			
				-    MY_USERNAME="$1" 
			 | 
		
	
		
			
			| 
				94
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				95
			 | 
			
				
			 | 
			
			
				-    # Minimum password length 
			 | 
		
	
		
			
			| 
				96
			 | 
			
				
			 | 
			
			
				-    -m|--min) 
			 | 
		
	
		
			
			| 
				97
			 | 
			
				
			 | 
			
			
				-    shift 
			 | 
		
	
		
			
			| 
				98
			 | 
			
				
			 | 
			
			
				-    MINIMUM_PASSWORD_LENGTH="$1" 
			 | 
		
	
		
			
			| 
				99
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				100
			 | 
			
				
			 | 
			
			
				-    # Title shown 
			 | 
		
	
		
			
			| 
				101
			 | 
			
				
			 | 
			
			
				-    -t|--title) 
			 | 
		
	
		
			
			| 
				102
			 | 
			
				
			 | 
			
			
				-    shift 
			 | 
		
	
		
			
			| 
				103
			 | 
			
				
			 | 
			
			
				-    TITLE="$1" 
			 | 
		
	
		
			
			| 
				104
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				105
			 | 
			
				
			 | 
			
			
				-    # reciprocal user accounts 
			 | 
		
	
		
			
			| 
				106
			 | 
			
				
			 | 
			
			
				-    -r|--reciprocal) 
			 | 
		
	
		
			
			| 
				107
			 | 
			
				
			 | 
			
			
				-    shift 
			 | 
		
	
		
			
			| 
				108
			 | 
			
				
			 | 
			
			
				-    RECIPROCAL="yes" 
			 | 
		
	
		
			
			| 
				109
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				110
			 | 
			
				
			 | 
			
			
				-    *) 
			 | 
		
	
		
			
			| 
				111
			 | 
			
				
			 | 
			
			
				-    # unknown option 
			 | 
		
	
		
			
			| 
				112
			 | 
			
				
			 | 
			
			
				-    ;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				90
			 | 
			
			
				+	-h|--help) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				91
			 | 
			
			
				+	show_help 
			 | 
		
	
		
			
			| 
				
			 | 
			
				92
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				93
			 | 
			
			
				+	# backup list filename 
			 | 
		
	
		
			
			| 
				
			 | 
			
				94
			 | 
			
			
				+	# typically /home/$USER/backup.list 
			 | 
		
	
		
			
			| 
				
			 | 
			
				95
			 | 
			
			
				+	-l|--list) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				96
			 | 
			
			
				+	shift 
			 | 
		
	
		
			
			| 
				
			 | 
			
				97
			 | 
			
			
				+	FRIENDS_SERVERS_LIST="$1" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				98
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				99
			 | 
			
			
				+	# username within /home 
			 | 
		
	
		
			
			| 
				
			 | 
			
				100
			 | 
			
			
				+	-u|--user) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				101
			 | 
			
			
				+	shift 
			 | 
		
	
		
			
			| 
				
			 | 
			
				102
			 | 
			
			
				+	MY_USERNAME="$1" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				103
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				104
			 | 
			
			
				+	# Minimum password length 
			 | 
		
	
		
			
			| 
				
			 | 
			
				105
			 | 
			
			
				+	-m|--min) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				106
			 | 
			
			
				+	shift 
			 | 
		
	
		
			
			| 
				
			 | 
			
				107
			 | 
			
			
				+	MINIMUM_PASSWORD_LENGTH="$1" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				108
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				109
			 | 
			
			
				+	# Title shown 
			 | 
		
	
		
			
			| 
				
			 | 
			
				110
			 | 
			
			
				+	-t|--title) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				111
			 | 
			
			
				+	shift 
			 | 
		
	
		
			
			| 
				
			 | 
			
				112
			 | 
			
			
				+	TITLE="$1" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				113
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				114
			 | 
			
			
				+	# reciprocal user accounts 
			 | 
		
	
		
			
			| 
				
			 | 
			
				115
			 | 
			
			
				+	-r|--reciprocal) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				116
			 | 
			
			
				+	shift 
			 | 
		
	
		
			
			| 
				
			 | 
			
				117
			 | 
			
			
				+	RECIPROCAL="yes" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				118
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				119
			 | 
			
			
				+	*) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				120
			 | 
			
			
				+	# unknown option 
			 | 
		
	
		
			
			| 
				
			 | 
			
				121
			 | 
			
			
				+	;; 
			 | 
		
	
		
			
			| 
				113
			 | 
			
				122
			 | 
			
			
				 esac 
			 | 
		
	
		
			
			| 
				114
			 | 
			
				123
			 | 
			
			
				 shift 
			 | 
		
	
		
			
			| 
				115
			 | 
			
				124
			 | 
			
			
				 done 
			 | 
		
	
		
			
			| 
				116
			 | 
			
				125
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				117
			 | 
			
				126
			 | 
			
			
				 function interactive_configuration_remote_backups { 
			 | 
		
	
		
			
			| 
				118
			 | 
			
				127
			 | 
			
			
				   if [ ! $MY_USERNAME ]; then 
			 | 
		
	
		
			
			| 
				119
			 | 
			
				
			 | 
			
			
				-      echo $'Please specify a username with the -u option' 
			 | 
		
	
		
			
			| 
				120
			 | 
			
				
			 | 
			
			
				-      exit 7356 
			 | 
		
	
		
			
			| 
				
			 | 
			
				128
			 | 
			
			
				+	  echo $'Please specify a username with the -u option' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				129
			 | 
			
			
				+	  exit 7356 
			 | 
		
	
		
			
			| 
				121
			 | 
			
				130
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				122
			 | 
			
				131
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				123
			 | 
			
				132
			 | 
			
			
				   if [ ! /home/$MY_USERNAME ]; then 
			 | 
		
	
		
			
			| 
				124
			 | 
			
				
			 | 
			
			
				-      echo $"The user /home/$MY_USERNAME does not exist on the system" 
			 | 
		
	
		
			
			| 
				125
			 | 
			
				
			 | 
			
			
				-      exit 3689 
			 | 
		
	
		
			
			| 
				
			 | 
			
				133
			 | 
			
			
				+	  echo $"The user /home/$MY_USERNAME does not exist on the system" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				134
			 | 
			
			
				+	  exit 3689 
			 | 
		
	
		
			
			| 
				126
			 | 
			
				135
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				127
			 | 
			
				136
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				128
			 | 
			
				137
			 | 
			
			
				   if [ ! $FRIENDS_SERVERS_LIST ]; then 
			 | 
		
	
		
			
			| 
				129
			 | 
			
				
			 | 
			
			
				-      FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list 
			 | 
		
	
		
			
			| 
				
			 | 
			
				138
			 | 
			
			
				+	  FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list 
			 | 
		
	
		
			
			| 
				130
			 | 
			
				139
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				131
			 | 
			
				140
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				132
			 | 
			
				141
			 | 
			
			
				   # clear any existing list 
			 | 
		
	
		
			
			| 
				133
			 | 
			
				142
			 | 
			
			
				   if [ -f $FRIENDS_SERVERS_LIST ]; then 
			 | 
		
	
		
			
			| 
				134
			 | 
			
				
			 | 
			
			
				-      rm -f $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				135
			 | 
			
				
			 | 
			
			
				-      touch $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				143
			 | 
			
			
				+	  rm -f $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				144
			 | 
			
			
				+	  touch $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				136
			 | 
			
				145
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				137
			 | 
			
				146
			 | 
			
			
				   # number of entries made 
			 | 
		
	
		
			
			| 
				138
			 | 
			
				147
			 | 
			
			
				   entering_remote_backups_ctr=1 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -146,103 +155,103 @@ function interactive_configuration_remote_backups { 
			 | 
		
	
		
			
			| 
				146
			 | 
			
				155
			 | 
			
			
				   remote_ssh_reciprocal_password="" 
			 | 
		
	
		
			
			| 
				147
			 | 
			
				156
			 | 
			
			
				   while [[ $entering_remote_backups_done == "no" ]] 
			 | 
		
	
		
			
			| 
				148
			 | 
			
				157
			 | 
			
			
				   do 
			 | 
		
	
		
			
			| 
				149
			 | 
			
				
			 | 
			
			
				-      data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				150
			 | 
			
				
			 | 
			
			
				-      trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				151
			 | 
			
				
			 | 
			
			
				-      if [[ $RECIPROCAL == "yes" ]]; then 
			 | 
		
	
		
			
			| 
				152
			 | 
			
				
			 | 
			
			
				-          dialog --backtitle "Freedombone Configuration" \ 
			 | 
		
	
		
			
			| 
				153
			 | 
			
				
			 | 
			
			
				-              --title "$TITLE ${entering_remote_backups_ctr}" \ 
			 | 
		
	
		
			
			| 
				154
			 | 
			
				
			 | 
			
			
				-              --form "\nPlease specify the SSH login details for the remote server\n\nThe reciprocal entries are optional, and can be used if you wish to set up a user account on this system for whoever runs the remote server to also use for backups" 20 50 8 \ 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				
			 | 
			
			
				-              "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				
			 | 
			
			
				-              "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				
			 | 
			
			
				-              "SSH port:" 3 1 "2222" 3 23 5 4 \ 
			 | 
		
	
		
			
			| 
				158
			 | 
			
				
			 | 
			
			
				-              "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ 
			 | 
		
	
		
			
			| 
				159
			 | 
			
				
			 | 
			
			
				-              "Reciprocal Username:" 5 1 "$remote_ssh_reciprocal_username" 5 23 20 100 \ 
			 | 
		
	
		
			
			| 
				160
			 | 
			
				
			 | 
			
			
				-              "Reciprocal Password:" 6 1 "$remote_ssh_reciprocal_password" 6 23 20 100 \ 
			 | 
		
	
		
			
			| 
				161
			 | 
			
				
			 | 
			
			
				-              2> $data 
			 | 
		
	
		
			
			| 
				162
			 | 
			
				
			 | 
			
			
				-      else 
			 | 
		
	
		
			
			| 
				163
			 | 
			
				
			 | 
			
			
				-          dialog --backtitle "Freedombone Configuration" \ 
			 | 
		
	
		
			
			| 
				164
			 | 
			
				
			 | 
			
			
				-              --title "$TITLE ${entering_remote_backups_ctr}" \ 
			 | 
		
	
		
			
			| 
				165
			 | 
			
				
			 | 
			
			
				-              --form "\nPlease specify the SSH login details for the remote server" 15 50 4 \ 
			 | 
		
	
		
			
			| 
				166
			 | 
			
				
			 | 
			
			
				-              "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ 
			 | 
		
	
		
			
			| 
				167
			 | 
			
				
			 | 
			
			
				-              "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ 
			 | 
		
	
		
			
			| 
				168
			 | 
			
				
			 | 
			
			
				-              "SSH port:" 3 1 "2222" 3 23 5 4 \ 
			 | 
		
	
		
			
			| 
				169
			 | 
			
				
			 | 
			
			
				-              "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ 
			 | 
		
	
		
			
			| 
				170
			 | 
			
				
			 | 
			
			
				-              2> $data 
			 | 
		
	
		
			
			| 
				171
			 | 
			
				
			 | 
			
			
				-      fi 
			 | 
		
	
		
			
			| 
				172
			 | 
			
				
			 | 
			
			
				-      sel=$? 
			 | 
		
	
		
			
			| 
				173
			 | 
			
				
			 | 
			
			
				-      case $sel in 
			 | 
		
	
		
			
			| 
				174
			 | 
			
				
			 | 
			
			
				-          1) entering_remote_backups_done="yes";; 
			 | 
		
	
		
			
			| 
				175
			 | 
			
				
			 | 
			
			
				-          255) entering_remote_backups_done="yes";; 
			 | 
		
	
		
			
			| 
				176
			 | 
			
				
			 | 
			
			
				-      esac 
			 | 
		
	
		
			
			| 
				177
			 | 
			
				
			 | 
			
			
				-      remote_ssh_username=$(cat $data | sed -n 1p) 
			 | 
		
	
		
			
			| 
				178
			 | 
			
				
			 | 
			
			
				-      remote_ssh_domain=$(cat $data | sed -n 2p) 
			 | 
		
	
		
			
			| 
				179
			 | 
			
				
			 | 
			
			
				-      remote_ssh_port=$(cat $data | sed -n 3p) 
			 | 
		
	
		
			
			| 
				180
			 | 
			
				
			 | 
			
			
				-      remote_ssh_password=$(cat $data | sed -n 4p) 
			 | 
		
	
		
			
			| 
				181
			 | 
			
				
			 | 
			
			
				-      remote_ssh_reciprocal_username=$(cat $data | sed -n 5p) 
			 | 
		
	
		
			
			| 
				182
			 | 
			
				
			 | 
			
			
				-      remote_ssh_reciprocal_password=$(cat $data | sed -n 6p) 
			 | 
		
	
		
			
			| 
				183
			 | 
			
				
			 | 
			
			
				-      if [[ $remote_ssh_username != "" && \ 
			 | 
		
	
		
			
			| 
				184
			 | 
			
				
			 | 
			
			
				-          $remote_ssh_domain != "" && \ 
			 | 
		
	
		
			
			| 
				185
			 | 
			
				
			 | 
			
			
				-          $remote_ssh_port != "" && \ 
			 | 
		
	
		
			
			| 
				186
			 | 
			
				
			 | 
			
			
				-          $remote_ssh_password != "" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				158
			 | 
			
			
				+	  data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				159
			 | 
			
			
				+	  trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				
			 | 
			
				160
			 | 
			
			
				+	  if [[ $RECIPROCAL == "yes" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				161
			 | 
			
			
				+		  dialog --backtitle "Freedombone Configuration" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				162
			 | 
			
			
				+			  --title "$TITLE ${entering_remote_backups_ctr}" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				163
			 | 
			
			
				+			  --form "\nPlease specify the SSH login details for the remote server\n\nThe reciprocal entries are optional, and can be used if you wish to set up a user account on this system for whoever runs the remote server to also use for backups" 20 50 8 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				164
			 | 
			
			
				+			  "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				165
			 | 
			
			
				+			  "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				166
			 | 
			
			
				+			  "SSH port:" 3 1 "2222" 3 23 5 4 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				167
			 | 
			
			
				+			  "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				168
			 | 
			
			
				+			  "Reciprocal Username:" 5 1 "$remote_ssh_reciprocal_username" 5 23 20 100 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				169
			 | 
			
			
				+			  "Reciprocal Password:" 6 1 "$remote_ssh_reciprocal_password" 6 23 20 100 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				170
			 | 
			
			
				+			  2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				171
			 | 
			
			
				+	  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				172
			 | 
			
			
				+		  dialog --backtitle "Freedombone Configuration" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				173
			 | 
			
			
				+			  --title "$TITLE ${entering_remote_backups_ctr}" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				174
			 | 
			
			
				+			  --form "\nPlease specify the SSH login details for the remote server" 15 50 4 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				175
			 | 
			
			
				+			  "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				176
			 | 
			
			
				+			  "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				177
			 | 
			
			
				+			  "SSH port:" 3 1 "2222" 3 23 5 4 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				178
			 | 
			
			
				+			  "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				179
			 | 
			
			
				+			  2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				180
			 | 
			
			
				+	  fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				181
			 | 
			
			
				+	  sel=$? 
			 | 
		
	
		
			
			| 
				
			 | 
			
				182
			 | 
			
			
				+	  case $sel in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				183
			 | 
			
			
				+		  1) entering_remote_backups_done="yes";; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				184
			 | 
			
			
				+		  255) entering_remote_backups_done="yes";; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				185
			 | 
			
			
				+	  esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				186
			 | 
			
			
				+	  remote_ssh_username=$(cat $data | sed -n 1p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				187
			 | 
			
			
				+	  remote_ssh_domain=$(cat $data | sed -n 2p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				188
			 | 
			
			
				+	  remote_ssh_port=$(cat $data | sed -n 3p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				189
			 | 
			
			
				+	  remote_ssh_password=$(cat $data | sed -n 4p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				190
			 | 
			
			
				+	  remote_ssh_reciprocal_username=$(cat $data | sed -n 5p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				191
			 | 
			
			
				+	  remote_ssh_reciprocal_password=$(cat $data | sed -n 6p) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				192
			 | 
			
			
				+	  if [[ $remote_ssh_username != "" && \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				193
			 | 
			
			
				+		  $remote_ssh_domain != "" && \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				194
			 | 
			
			
				+		  $remote_ssh_port != "" && \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				195
			 | 
			
			
				+		  $remote_ssh_password != "" ]]; then 
			 | 
		
	
		
			
			| 
				187
			 | 
			
				196
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				188
			 | 
			
				
			 | 
			
			
				-          if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				189
			 | 
			
				
			 | 
			
			
				-              dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 
			 | 
		
	
		
			
			| 
				190
			 | 
			
				
			 | 
			
			
				-          else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				197
			 | 
			
			
				+		  if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				198
			 | 
			
			
				+			  dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 
			 | 
		
	
		
			
			| 
				
			 | 
			
				199
			 | 
			
			
				+		  else 
			 | 
		
	
		
			
			| 
				191
			 | 
			
				200
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				192
			 | 
			
				
			 | 
			
			
				-              if [[ $RECIPROCAL == "yes" ]]; then 
			 | 
		
	
		
			
			| 
				193
			 | 
			
				
			 | 
			
			
				-                  if [[ $remote_ssh_reciprocal_username != "" && \ 
			 | 
		
	
		
			
			| 
				194
			 | 
			
				
			 | 
			
			
				-                        $remote_ssh_reciprocal_password != "" ]]; then 
			 | 
		
	
		
			
			| 
				195
			 | 
			
				
			 | 
			
			
				-                      if [ ${#remote_ssh_reciprocal_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				196
			 | 
			
				
			 | 
			
			
				-                          dialog --title "Password quality check" --msgbox "The reciprocal password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 
			 | 
		
	
		
			
			| 
				197
			 | 
			
				
			 | 
			
			
				-                      else 
			 | 
		
	
		
			
			| 
				198
			 | 
			
				
			 | 
			
			
				-                          echo ${remote_ssh_reciprocal_username}:${remote_ssh_reciprocal_password}::::/home/${remote_ssh_reciprocal_username}:bash | newusers 
			 | 
		
	
		
			
			| 
				199
			 | 
			
				
			 | 
			
			
				-                          echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				200
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				201
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				202
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				203
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				204
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_reciprocal_username="" 
			 | 
		
	
		
			
			| 
				205
			 | 
			
				
			 | 
			
			
				-                          remote_ssh_reciprocal_password="" 
			 | 
		
	
		
			
			| 
				206
			 | 
			
				
			 | 
			
			
				-                          entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				207
			 | 
			
				
			 | 
			
			
				-                      fi 
			 | 
		
	
		
			
			| 
				208
			 | 
			
				
			 | 
			
			
				-                  else 
			 | 
		
	
		
			
			| 
				209
			 | 
			
				
			 | 
			
			
				-                      echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				210
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				211
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				212
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				213
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				214
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_reciprocal_username="" 
			 | 
		
	
		
			
			| 
				215
			 | 
			
				
			 | 
			
			
				-                      remote_ssh_reciprocal_password="" 
			 | 
		
	
		
			
			| 
				216
			 | 
			
				
			 | 
			
			
				-                      entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				217
			 | 
			
				
			 | 
			
			
				-                  fi 
			 | 
		
	
		
			
			| 
				218
			 | 
			
				
			 | 
			
			
				-              else 
			 | 
		
	
		
			
			| 
				219
			 | 
			
				
			 | 
			
			
				-                  echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				220
			 | 
			
				
			 | 
			
			
				-                  remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				221
			 | 
			
				
			 | 
			
			
				-                  remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				222
			 | 
			
				
			 | 
			
			
				-                  remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				223
			 | 
			
				
			 | 
			
			
				-                  remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				224
			 | 
			
				
			 | 
			
			
				-                  entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				225
			 | 
			
				
			 | 
			
			
				-              fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				201
			 | 
			
			
				+			  if [[ $RECIPROCAL == "yes" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				202
			 | 
			
			
				+				  if [[ $remote_ssh_reciprocal_username != "" && \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				203
			 | 
			
			
				+						$remote_ssh_reciprocal_password != "" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				204
			 | 
			
			
				+					  if [ ${#remote_ssh_reciprocal_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				205
			 | 
			
			
				+						  dialog --title "Password quality check" --msgbox "The reciprocal password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 
			 | 
		
	
		
			
			| 
				
			 | 
			
				206
			 | 
			
			
				+					  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				207
			 | 
			
			
				+						  echo ${remote_ssh_reciprocal_username}:${remote_ssh_reciprocal_password}::::/home/${remote_ssh_reciprocal_username}:bash | newusers 
			 | 
		
	
		
			
			| 
				
			 | 
			
				208
			 | 
			
			
				+						  echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				209
			 | 
			
			
				+						  remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				210
			 | 
			
			
				+						  remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				211
			 | 
			
			
				+						  remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				212
			 | 
			
			
				+						  remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				213
			 | 
			
			
				+						  remote_ssh_reciprocal_username="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				214
			 | 
			
			
				+						  remote_ssh_reciprocal_password="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				215
			 | 
			
			
				+						  entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				216
			 | 
			
			
				+					  fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				217
			 | 
			
			
				+				  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				218
			 | 
			
			
				+					  echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				219
			 | 
			
			
				+					  remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				220
			 | 
			
			
				+					  remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				221
			 | 
			
			
				+					  remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				222
			 | 
			
			
				+					  remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				223
			 | 
			
			
				+					  remote_ssh_reciprocal_username="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				224
			 | 
			
			
				+					  remote_ssh_reciprocal_password="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				225
			 | 
			
			
				+					  entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				226
			 | 
			
			
				+				  fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				227
			 | 
			
			
				+			  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				228
			 | 
			
			
				+				  echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				229
			 | 
			
			
				+				  remote_ssh_username="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				230
			 | 
			
			
				+				  remote_ssh_domain="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				231
			 | 
			
			
				+				  remote_ssh_port="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				232
			 | 
			
			
				+				  remote_ssh_password="" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				233
			 | 
			
			
				+				  entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				234
			 | 
			
			
				+			  fi 
			 | 
		
	
		
			
			| 
				226
			 | 
			
				235
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				227
			 | 
			
				
			 | 
			
			
				-          fi 
			 | 
		
	
		
			
			| 
				228
			 | 
			
				
			 | 
			
			
				-      else 
			 | 
		
	
		
			
			| 
				229
			 | 
			
				
			 | 
			
			
				-          entering_remote_backups_done="yes" 
			 | 
		
	
		
			
			| 
				230
			 | 
			
				
			 | 
			
			
				-      fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				236
			 | 
			
			
				+		  fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				237
			 | 
			
			
				+	  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				238
			 | 
			
			
				+		  entering_remote_backups_done="yes" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				239
			 | 
			
			
				+	  fi 
			 | 
		
	
		
			
			| 
				231
			 | 
			
				240
			 | 
			
			
				   done 
			 | 
		
	
		
			
			| 
				232
			 | 
			
				241
			 | 
			
			
				   if [ -f $FRIENDS_SERVERS_LIST ]; then 
			 | 
		
	
		
			
			| 
				233
			 | 
			
				
			 | 
			
			
				-      chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				
			 | 
			
				242
			 | 
			
			
				+	  chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST 
			 | 
		
	
		
			
			| 
				234
			 | 
			
				243
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				235
			 | 
			
				244
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				236
			 | 
			
				245
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				237
			 | 
			
				246
			 | 
			
			
				 function show_result { 
			 | 
		
	
		
			
			| 
				238
			 | 
			
				247
			 | 
			
			
				   clear 
			 | 
		
	
		
			
			| 
				239
			 | 
			
				248
			 | 
			
			
				   if (( $entering_remote_backups_ctr < 2 )); then 
			 | 
		
	
		
			
			| 
				240
			 | 
			
				
			 | 
			
			
				-      echo $'No remote backup locations were specified' 
			 | 
		
	
		
			
			| 
				241
			 | 
			
				
			 | 
			
			
				-      exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				249
			 | 
			
			
				+	  echo $'No remote backup locations were specified' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				250
			 | 
			
			
				+	  exit 0 
			 | 
		
	
		
			
			| 
				242
			 | 
			
				251
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				252
			 | 
			
			
				   if [ ! -f $FRIENDS_SERVERS_LIST ]; then 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				
			 | 
			
			
				-      echo $"No remote backups list found: $FRIENDS_SERVERS_LIST" 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				
			 | 
			
			
				-      exit 7358 
			 | 
		
	
		
			
			| 
				
			 | 
			
				253
			 | 
			
			
				+	  echo $"No remote backups list found: $FRIENDS_SERVERS_LIST" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				254
			 | 
			
			
				+	  exit 7358 
			 | 
		
	
		
			
			| 
				246
			 | 
			
				255
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				247
			 | 
			
				256
			 | 
			
			
				   echo '' 
			 | 
		
	
		
			
			| 
				248
			 | 
			
				257
			 | 
			
			
				   echo $"Remote backups list: $FRIENDS_SERVERS_LIST" 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -254,7 +263,7 @@ function show_result { 
			 | 
		
	
		
			
			| 
				254
			 | 
			
				263
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				255
			 | 
			
				264
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				256
			 | 
			
				265
			 | 
			
			
				 if [ ! $FRIENDS_SERVERS_LIST ]; then 
			 | 
		
	
		
			
			| 
				257
			 | 
			
				
			 | 
			
			
				-    FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list 
			 | 
		
	
		
			
			| 
				
			 | 
			
				266
			 | 
			
			
				+	FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list 
			 | 
		
	
		
			
			| 
				258
			 | 
			
				267
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				259
			 | 
			
				268
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				260
			 | 
			
				269
			 | 
			
			
				 interactive_configuration_remote_backups 
			 |