| 
				
			 | 
			
			
				@@ -30,14 +30,14 @@ 
			 | 
		
	
		
			
			| 
				30
			 | 
			
				30
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				31
			 | 
			
				31
			 | 
			
			
				 VARIANTS='full chat' 
			 | 
		
	
		
			
			| 
				32
			 | 
			
				32
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				33
			 | 
			
				
			 | 
			
			
				-# Password used for VoIP server 
			 | 
		
	
		
			
			| 
				34
			 | 
			
				
			 | 
			
			
				-VOIP_SERVER_PASSWORD= 
			 | 
		
	
		
			
			| 
				35
			 | 
			
				
			 | 
			
			
				-# Port on which VoIP server listens 
			 | 
		
	
		
			
			| 
				36
			 | 
			
				
			 | 
			
			
				-VOIP_PORT=64738 
			 | 
		
	
		
			
			| 
				
			 | 
			
				33
			 | 
			
			
				+# Password used for mumble server 
			 | 
		
	
		
			
			| 
				
			 | 
			
				34
			 | 
			
			
				+MUMBLE_SERVER_PASSWORD= 
			 | 
		
	
		
			
			| 
				
			 | 
			
				35
			 | 
			
			
				+# Port on which mumble server listens 
			 | 
		
	
		
			
			| 
				
			 | 
			
				36
			 | 
			
			
				+MUMBLE_PORT=64738 
			 | 
		
	
		
			
			| 
				37
			 | 
			
				37
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				38
			 | 
			
				
			 | 
			
			
				-# Location of VoIP database and configuration 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				
			 | 
			
			
				-VOIP_DATABASE="mumble-server.sqlite" 
			 | 
		
	
		
			
			| 
				40
			 | 
			
				
			 | 
			
			
				-VOIP_CONFIG_FILE="mumble-server.ini" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				38
			 | 
			
			
				+# Location of mumble database and configuration 
			 | 
		
	
		
			
			| 
				
			 | 
			
				39
			 | 
			
			
				+MUMBLE_DATABASE="mumble-server.sqlite" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				40
			 | 
			
			
				+MUMBLE_CONFIG_FILE="mumble-server.ini" 
			 | 
		
	
		
			
			| 
				41
			 | 
			
				41
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				42
			 | 
			
				42
			 | 
			
			
				 function install_interactive_mumble { 
			 | 
		
	
		
			
			| 
				43
			 | 
			
				43
			 | 
			
			
				     echo -n '' 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -58,23 +58,23 @@ function upgrade_mumble { 
			 | 
		
	
		
			
			| 
				58
			 | 
			
				58
			 | 
			
			
				 function backup_local_mumble { 
			 | 
		
	
		
			
			| 
				59
			 | 
			
				59
			 | 
			
			
				     if [ -f /etc/mumble-server.ini ]; then 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				60
			 | 
			
			
				         echo $"Backing up Mumble settings" 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				
			 | 
			
			
				-        temp_backup_dir=/root/tempvoipbackup 
			 | 
		
	
		
			
			| 
				
			 | 
			
				61
			 | 
			
			
				+        temp_backup_dir=/root/tempmumblebackup 
			 | 
		
	
		
			
			| 
				62
			 | 
			
				62
			 | 
			
			
				         if [ ! -d $temp_backup_dir ]; then 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				63
			 | 
			
			
				             mkdir -p $temp_backup_dir 
			 | 
		
	
		
			
			| 
				64
			 | 
			
				64
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				65
			 | 
			
				65
			 | 
			
			
				         cp -f /etc/mumble-server.ini $temp_backup_dir 
			 | 
		
	
		
			
			| 
				66
			 | 
			
				66
			 | 
			
			
				         cp -f /var/lib/mumble-server/mumble-server.sqlite $temp_backup_dir 
			 | 
		
	
		
			
			| 
				67
			 | 
			
				
			 | 
			
			
				-        backup_directory_to_usb $temp_backup_dir voip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				67
			 | 
			
			
				+        backup_directory_to_usb $temp_backup_dir mumble 
			 | 
		
	
		
			
			| 
				68
			 | 
			
				68
			 | 
			
			
				         echo $"Mumble settings backup complete" 
			 | 
		
	
		
			
			| 
				69
			 | 
			
				69
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				70
			 | 
			
				70
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				71
			 | 
			
				71
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				72
			 | 
			
				72
			 | 
			
			
				 function restore_local_mumble { 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				
			 | 
			
			
				-    if [ -d $USB_MOUNT/backup/voip ]; then 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				
			 | 
			
			
				-        echo $"Restoring VoIP settings" 
			 | 
		
	
		
			
			| 
				75
			 | 
			
				
			 | 
			
			
				-        temp_restore_dir=/root/tempvoip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				73
			 | 
			
			
				+    if [ -d $USB_MOUNT/backup/mumble ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				74
			 | 
			
			
				+        echo $"Restoring mumble settings" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				75
			 | 
			
			
				+        temp_restore_dir=/root/tempmumble 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				76
			 | 
			
			
				         function_check restore_directory_from_usb 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				
			 | 
			
			
				-        restore_directory_from_usb $temp_restore_dir voip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				77
			 | 
			
			
				+        restore_directory_from_usb $temp_restore_dir mumble 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				78
			 | 
			
			
				         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/ 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				79
			 | 
			
			
				         if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				80
			 | 
			
			
				             rm -rf $temp_restore_dir 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -103,23 +103,23 @@ function restore_local_mumble { 
			 | 
		
	
		
			
			| 
				103
			 | 
			
				103
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				104
			 | 
			
				104
			 | 
			
			
				 function backup_remote_mumble { 
			 | 
		
	
		
			
			| 
				105
			 | 
			
				105
			 | 
			
			
				     if [ -f /etc/mumble-server.ini ]; then 
			 | 
		
	
		
			
			| 
				106
			 | 
			
				
			 | 
			
			
				-        echo $"Backing up VoIP settings" 
			 | 
		
	
		
			
			| 
				107
			 | 
			
				
			 | 
			
			
				-        if [ ! -d /root/tempvoipbackup ]; then 
			 | 
		
	
		
			
			| 
				108
			 | 
			
				
			 | 
			
			
				-            mkdir -p /root/tempvoipbackup 
			 | 
		
	
		
			
			| 
				
			 | 
			
				106
			 | 
			
			
				+        echo $"Backing up mumble settings" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				107
			 | 
			
			
				+        if [ ! -d /root/tempmumblebackup ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				108
			 | 
			
			
				+            mkdir -p /root/tempmumblebackup 
			 | 
		
	
		
			
			| 
				109
			 | 
			
				109
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				110
			 | 
			
				
			 | 
			
			
				-        cp -f /etc/mumble-server.ini /root/tempvoipbackup 
			 | 
		
	
		
			
			| 
				111
			 | 
			
				
			 | 
			
			
				-        cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup 
			 | 
		
	
		
			
			| 
				112
			 | 
			
				
			 | 
			
			
				-        backup_directory_to_friend /root/tempvoipbackup voip 
			 | 
		
	
		
			
			| 
				113
			 | 
			
				
			 | 
			
			
				-        echo $"Backup of VoIP settings complete" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				110
			 | 
			
			
				+        cp -f /etc/mumble-server.ini /root/tempmumblebackup 
			 | 
		
	
		
			
			| 
				
			 | 
			
				111
			 | 
			
			
				+        cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempmumblebackup 
			 | 
		
	
		
			
			| 
				
			 | 
			
				112
			 | 
			
			
				+        backup_directory_to_friend /root/tempmumblebackup mumble 
			 | 
		
	
		
			
			| 
				
			 | 
			
				113
			 | 
			
			
				+        echo $"Backup of mumble settings complete" 
			 | 
		
	
		
			
			| 
				114
			 | 
			
				114
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				115
			 | 
			
				115
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				116
			 | 
			
				116
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				117
			 | 
			
				117
			 | 
			
			
				 function restore_remote_mumble { 
			 | 
		
	
		
			
			| 
				118
			 | 
			
				
			 | 
			
			
				-    if [ -d $SERVER_DIRECTORY/backup/voip ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				118
			 | 
			
			
				+    if [ -d $SERVER_DIRECTORY/backup/mumble ]; then 
			 | 
		
	
		
			
			| 
				119
			 | 
			
				119
			 | 
			
			
				         echo $"Restoring Mumble settings" 
			 | 
		
	
		
			
			| 
				120
			 | 
			
				
			 | 
			
			
				-        temp_restore_dir=/root/tempvoip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				120
			 | 
			
			
				+        temp_restore_dir=/root/tempmumble 
			 | 
		
	
		
			
			| 
				121
			 | 
			
				121
			 | 
			
			
				         function_check restore_directory_from_friend 
			 | 
		
	
		
			
			| 
				122
			 | 
			
				
			 | 
			
			
				-        restore_directory_from_friend $temp_restore_dir voip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				122
			 | 
			
			
				+        restore_directory_from_friend $temp_restore_dir mumble 
			 | 
		
	
		
			
			| 
				123
			 | 
			
				123
			 | 
			
			
				         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/ 
			 | 
		
	
		
			
			| 
				124
			 | 
			
				124
			 | 
			
			
				         if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				125
			 | 
			
				125
			 | 
			
			
				             rm -rf $temp_restore_dir 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -150,8 +150,8 @@ function remove_mumble { 
			 | 
		
	
		
			
			| 
				150
			 | 
			
				150
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				151
			 | 
			
				151
			 | 
			
			
				     apt-get -y remove --purge mumble-server 
			 | 
		
	
		
			
			| 
				152
			 | 
			
				152
			 | 
			
			
				     if [[ $ONION_ONLY == "no" ]]; then 
			 | 
		
	
		
			
			| 
				153
			 | 
			
				
			 | 
			
			
				-        iptables -D INPUT -p udp --dport $VOIP_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				154
			 | 
			
				
			 | 
			
			
				-        iptables -D INPUT -p tcp --dport $VOIP_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				153
			 | 
			
			
				+        iptables -D INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				154
			 | 
			
			
				+        iptables -D INPUT -p tcp --dport $MUMBLE_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				155
			 | 
			
			
				         function_check save_firewall_settings 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				156
			 | 
			
			
				         save_firewall_settings 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				157
			 | 
			
			
				     fi 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -159,57 +159,54 @@ function remove_mumble { 
			 | 
		
	
		
			
			| 
				159
			 | 
			
				159
			 | 
			
			
				         rm /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				160
			 | 
			
				160
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				161
			 | 
			
				161
			 | 
			
			
				     function_check remove_onion_service 
			 | 
		
	
		
			
			| 
				162
			 | 
			
				
			 | 
			
			
				-    remove_onion_service voip ${VOIP_PORT} 
			 | 
		
	
		
			
			| 
				163
			 | 
			
				
			 | 
			
			
				-    sed -i '/install_mumble/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				164
			 | 
			
				
			 | 
			
			
				-    sed -i '/install_voip/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				165
			 | 
			
				
			 | 
			
			
				-    sed -i '/configure_firewall_for_voip/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				166
			 | 
			
				
			 | 
			
			
				-    sed -i '/VoIP /d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				162
			 | 
			
			
				+    remove_onion_service mumble ${MUMBLE_PORT} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				163
			 | 
			
			
				+    sed -i '/mumble/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				167
			 | 
			
				164
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				168
			 | 
			
				165
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				169
			 | 
			
				
			 | 
			
			
				-function get_voip_server_password { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				166
			 | 
			
			
				+function get_mumble_server_password { 
			 | 
		
	
		
			
			| 
				170
			 | 
			
				167
			 | 
			
			
				     if [ -f /home/$MY_USERNAME/README ]; then 
			 | 
		
	
		
			
			| 
				171
			 | 
			
				
			 | 
			
			
				-        if grep -q "VoIP server password" /home/$MY_USERNAME/README; then 
			 | 
		
	
		
			
			| 
				172
			 | 
			
				
			 | 
			
			
				-            if [ ! $VOIP_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				173
			 | 
			
				
			 | 
			
			
				-                VOIP_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "VoIP server password" | awk -F ':' '{print $2}' | sed 's/^ *//') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				168
			 | 
			
			
				+        if grep -q "mumble server password" /home/$MY_USERNAME/README; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				169
			 | 
			
			
				+            if [ ! $MUMBLE_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				170
			 | 
			
			
				+                MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//') 
			 | 
		
	
		
			
			| 
				174
			 | 
			
				171
			 | 
			
			
				             fi 
			 | 
		
	
		
			
			| 
				175
			 | 
			
				172
			 | 
			
			
				         else 
			 | 
		
	
		
			
			| 
				176
			 | 
			
				173
			 | 
			
			
				             if grep -q "Mumble server password" /home/$MY_USERNAME/README; then 
			 | 
		
	
		
			
			| 
				177
			 | 
			
				
			 | 
			
			
				-                if [ ! $VOIP_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				178
			 | 
			
				
			 | 
			
			
				-                    VOIP_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				174
			 | 
			
			
				+                if [ ! $MUMBLE_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				175
			 | 
			
			
				+                    MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//') 
			 | 
		
	
		
			
			| 
				179
			 | 
			
				176
			 | 
			
			
				                 fi 
			 | 
		
	
		
			
			| 
				180
			 | 
			
				177
			 | 
			
			
				             fi 
			 | 
		
	
		
			
			| 
				181
			 | 
			
				178
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				182
			 | 
			
				179
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				183
			 | 
			
				180
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				184
			 | 
			
				181
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				185
			 | 
			
				
			 | 
			
			
				-function configure_firewall_for_voip { 
			 | 
		
	
		
			
			| 
				186
			 | 
			
				
			 | 
			
			
				-    if grep -Fxq "configure_firewall_for_voip" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				182
			 | 
			
			
				+function configure_firewall_for_mumble { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				183
			 | 
			
			
				+    if grep -Fxq "configure_firewall_for_mumble" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				187
			 | 
			
				184
			 | 
			
			
				         return 
			 | 
		
	
		
			
			| 
				188
			 | 
			
				185
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				189
			 | 
			
				186
			 | 
			
			
				     if [[ $ONION_ONLY != "no" ]]; then 
			 | 
		
	
		
			
			| 
				190
			 | 
			
				187
			 | 
			
			
				         return 
			 | 
		
	
		
			
			| 
				191
			 | 
			
				188
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				192
			 | 
			
				
			 | 
			
			
				-    iptables -A INPUT -p udp --dport $VOIP_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				193
			 | 
			
				
			 | 
			
			
				-    iptables -A INPUT -p tcp --dport $VOIP_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				189
			 | 
			
			
				+    iptables -A INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				190
			 | 
			
			
				+    iptables -A INPUT -p tcp --dport $MUMBLE_PORT -j ACCEPT 
			 | 
		
	
		
			
			| 
				194
			 | 
			
				191
			 | 
			
			
				     function_check save_firewall_settings 
			 | 
		
	
		
			
			| 
				195
			 | 
			
				192
			 | 
			
			
				     save_firewall_settings 
			 | 
		
	
		
			
			| 
				196
			 | 
			
				193
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				197
			 | 
			
				
			 | 
			
			
				-    OPEN_PORTS+=("Mumble   $VOIP_PORT") 
			 | 
		
	
		
			
			| 
				198
			 | 
			
				
			 | 
			
			
				-    echo 'configure_firewall_for_voip' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				194
			 | 
			
			
				+    OPEN_PORTS+=("Mumble   $MUMBLE_PORT") 
			 | 
		
	
		
			
			| 
				
			 | 
			
				195
			 | 
			
			
				+    echo 'configure_firewall_for_mumble' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				199
			 | 
			
				196
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				200
			 | 
			
				197
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				201
			 | 
			
				198
			 | 
			
			
				 function install_mumble { 
			 | 
		
	
		
			
			| 
				202
			 | 
			
				199
			 | 
			
			
				     apt-get -y install mumble-server 
			 | 
		
	
		
			
			| 
				203
			 | 
			
				200
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				204
			 | 
			
				
			 | 
			
			
				-    function_check get_voip_server_password 
			 | 
		
	
		
			
			| 
				205
			 | 
			
				
			 | 
			
			
				-    get_voip_server_password 
			 | 
		
	
		
			
			| 
				206
			 | 
			
				
			 | 
			
			
				-    if [ ! $VOIP_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				201
			 | 
			
			
				+    function_check get_mumble_server_password 
			 | 
		
	
		
			
			| 
				
			 | 
			
				202
			 | 
			
			
				+    get_mumble_server_password 
			 | 
		
	
		
			
			| 
				
			 | 
			
				203
			 | 
			
			
				+    if [ ! $MUMBLE_SERVER_PASSWORD ]; then 
			 | 
		
	
		
			
			| 
				207
			 | 
			
				204
			 | 
			
			
				         if [ -f $IMAGE_PASSWORD_FILE ]; then 
			 | 
		
	
		
			
			| 
				208
			 | 
			
				
			 | 
			
			
				-            VOIP_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				205
			 | 
			
			
				+            MUMBLE_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" 
			 | 
		
	
		
			
			| 
				209
			 | 
			
				206
			 | 
			
			
				         else 
			 | 
		
	
		
			
			| 
				210
			 | 
			
				
			 | 
			
			
				-            VOIP_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" 
			 | 
		
	
		
			
			| 
				211
			 | 
			
				
			 | 
			
			
				-            if [ ${#VOIP_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				212
			 | 
			
				
			 | 
			
			
				-                VOIP_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				207
			 | 
			
			
				+            MUMBLE_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				208
			 | 
			
			
				+            if [ ${#MUMBLE_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				209
			 | 
			
			
				+                MUMBLE_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" 
			 | 
		
	
		
			
			| 
				213
			 | 
			
				210
			 | 
			
			
				             fi 
			 | 
		
	
		
			
			| 
				214
			 | 
			
				211
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				215
			 | 
			
				212
			 | 
			
			
				     fi 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -223,11 +220,11 @@ function install_mumble { 
			 | 
		
	
		
			
			| 
				223
			 | 
			
				220
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				224
			 | 
			
				221
			 | 
			
			
				     # Check that the cert was created 
			 | 
		
	
		
			
			| 
				225
			 | 
			
				222
			 | 
			
			
				     if [ ! -f /etc/ssl/certs/mumble.crt ]; then 
			 | 
		
	
		
			
			| 
				226
			 | 
			
				
			 | 
			
			
				-        echo $'VoIP server certificate not created' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				223
			 | 
			
			
				+        echo $'mumble server certificate not created' 
			 | 
		
	
		
			
			| 
				227
			 | 
			
				224
			 | 
			
			
				         exit 57892 
			 | 
		
	
		
			
			| 
				228
			 | 
			
				225
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				229
			 | 
			
				226
			 | 
			
			
				     if [ ! -f /etc/ssl/private/mumble.key ]; then 
			 | 
		
	
		
			
			| 
				230
			 | 
			
				
			 | 
			
			
				-        echo $'VoIP server key not created' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				227
			 | 
			
			
				+        echo $'mumble server key not created' 
			 | 
		
	
		
			
			| 
				231
			 | 
			
				228
			 | 
			
			
				         exit 57893 
			 | 
		
	
		
			
			| 
				232
			 | 
			
				229
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				233
			 | 
			
				230
			 | 
			
			
				     if [ ! -d /var/lib/mumble-server ]; then 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -237,10 +234,10 @@ function install_mumble { 
			 | 
		
	
		
			
			| 
				237
			 | 
			
				234
			 | 
			
			
				     cp /etc/ssl/private/mumble.key /var/lib/mumble-server 
			 | 
		
	
		
			
			| 
				238
			 | 
			
				235
			 | 
			
			
				     chown -R mumble-server:mumble-server /var/lib/mumble-server 
			 | 
		
	
		
			
			| 
				239
			 | 
			
				236
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				240
			 | 
			
				
			 | 
			
			
				-    sed -i "s|welcometext=.*|welcometext=\"<br />Welcome to $DEFAULT_DOMAIN_NAME <b>VoIP</b>.<br />Chat freely!<br />\"|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				
			 | 
			
				237
			 | 
			
			
				+    sed -i "s|welcometext=.*|welcometext=\"<br />Welcome to $DEFAULT_DOMAIN_NAME <b>mumble</b>.<br />Chat freely!<br />\"|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				241
			 | 
			
				238
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				242
			 | 
			
				
			 | 
			
			
				-    if [[ $VOIP_SERVER_PASSWORD && $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				
			 | 
			
			
				-        sed -i "s|serverpassword=.*|serverpassword=$VOIP_SERVER_PASSWORD|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				
			 | 
			
				239
			 | 
			
			
				+    if [[ $MUMBLE_SERVER_PASSWORD && $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				240
			 | 
			
			
				+        sed -i "s|serverpassword=.*|serverpassword=$MUMBLE_SERVER_PASSWORD|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				241
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				242
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				246
			 | 
			
				243
			 | 
			
			
				     sed -i 's|#autobanAttempts.*|autobanAttempts = 10|g' /etc/mumble-server.ini 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -262,9 +259,9 @@ function install_mumble { 
			 | 
		
	
		
			
			| 
				262
			 | 
			
				259
			 | 
			
			
				     sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				263
			 | 
			
				260
			 | 
			
			
				     sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				264
			 | 
			
				261
			 | 
			
			
				     sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				265
			 | 
			
				
			 | 
			
			
				-    sed -i "s|port=.*|port=${VOIP_PORT}|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				
			 | 
			
				262
			 | 
			
			
				+    sed -i "s|port=.*|port=${MUMBLE_PORT}|g" /etc/mumble-server.ini 
			 | 
		
	
		
			
			| 
				266
			 | 
			
				263
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				267
			 | 
			
				
			 | 
			
			
				-    VOIP_ONION_HOSTNAME=$(add_onion_service mumble ${VOIP_PORT} ${VOIP_PORT}) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				264
			 | 
			
			
				+    MUMBLE_ONION_HOSTNAME=$(add_onion_service mumble ${MUMBLE_PORT} ${MUMBLE_PORT}) 
			 | 
		
	
		
			
			| 
				268
			 | 
			
				265
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				269
			 | 
			
				266
			 | 
			
			
				     systemctl restart mumble-server 
			 | 
		
	
		
			
			| 
				270
			 | 
			
				267
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -273,10 +270,10 @@ function install_mumble { 
			 | 
		
	
		
			
			| 
				273
			 | 
			
				270
			 | 
			
			
				         echo '' >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				274
			 | 
			
				271
			 | 
			
			
				         echo $'Mumble Server' >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				275
			 | 
			
				272
			 | 
			
			
				         echo '=============' >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				276
			 | 
			
				
			 | 
			
			
				-        echo $"Mumble onion domain:$VOIP_ONION_HOSTNAME" >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				
			 | 
			
				273
			 | 
			
			
				+        echo $"Mumble onion domain:$MUMBLE_ONION_HOSTNAME" >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				277
			 | 
			
				274
			 | 
			
			
				         echo $'Mumble server username: mumble-server' >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				278
			 | 
			
				275
			 | 
			
			
				         if [[ $SYSTEM_TYPE != "VARIANT_MESH" ]]; then 
			 | 
		
	
		
			
			| 
				279
			 | 
			
				
			 | 
			
			
				-            echo $"Mumble server password: $VOIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				
			 | 
			
				276
			 | 
			
			
				+            echo $"Mumble server password: $MUMBLE_SERVER_PASSWORD" >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				280
			 | 
			
				277
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				281
			 | 
			
				278
			 | 
			
			
				         echo '' >> /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				282
			 | 
			
				279
			 | 
			
			
				         echo $'To connect to the Mumble server use your username and the server password shown above.' >> /home/$MY_USERNAME/README 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -284,8 +281,8 @@ function install_mumble { 
			 | 
		
	
		
			
			| 
				284
			 | 
			
				281
			 | 
			
			
				         chmod 600 /home/$MY_USERNAME/README 
			 | 
		
	
		
			
			| 
				285
			 | 
			
				282
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				286
			 | 
			
				283
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				287
			 | 
			
				
			 | 
			
			
				-    function_check configure_firewall_for_voip 
			 | 
		
	
		
			
			| 
				288
			 | 
			
				
			 | 
			
			
				-    configure_firewall_for_voip 
			 | 
		
	
		
			
			| 
				
			 | 
			
				284
			 | 
			
			
				+    function_check configure_firewall_for_mumble 
			 | 
		
	
		
			
			| 
				
			 | 
			
				285
			 | 
			
			
				+    configure_firewall_for_mumble 
			 | 
		
	
		
			
			| 
				289
			 | 
			
				286
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				290
			 | 
			
				287
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				291
			 | 
			
				288
			 | 
			
			
				 # NOTE: deliberately no exit 0 
			 |