浏览代码

Change voip to mumble for more consistent terminology

Bob Mottram 8 年前
父节点
当前提交
71a93bac16

+ 4
- 4
src/freedombone 查看文件

192
                 shift
192
                 shift
193
                 ENABLE_BABEL="yes"
193
                 ENABLE_BABEL="yes"
194
                 ;;
194
                 ;;
195
-            # VoIP server password
195
+            # Mumble server password
196
             --vpass)
196
             --vpass)
197
                 shift
197
                 shift
198
-                VOIP_SERVER_PASSWORD=$1
198
+                MUMBLE_SERVER_PASSWORD=$1
199
                 ;;
199
                 ;;
200
-            # VoIP server port
200
+            # Mumble server port
201
             --vport)
201
             --vport)
202
                 shift
202
                 shift
203
-                VOIP_PORT=$1
203
+                MUMBLE_PORT=$1
204
                 ;;
204
                 ;;
205
             # DNS Nameserver 1
205
             # DNS Nameserver 1
206
             --ns1)
206
             --ns1)

+ 57
- 60
src/freedombone-app-mumble 查看文件

30
 
30
 
31
 VARIANTS='full chat'
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
 function install_interactive_mumble {
42
 function install_interactive_mumble {
43
     echo -n ''
43
     echo -n ''
58
 function backup_local_mumble {
58
 function backup_local_mumble {
59
     if [ -f /etc/mumble-server.ini ]; then
59
     if [ -f /etc/mumble-server.ini ]; then
60
         echo $"Backing up Mumble settings"
60
         echo $"Backing up Mumble settings"
61
-        temp_backup_dir=/root/tempvoipbackup
61
+        temp_backup_dir=/root/tempmumblebackup
62
         if [ ! -d $temp_backup_dir ]; then
62
         if [ ! -d $temp_backup_dir ]; then
63
             mkdir -p $temp_backup_dir
63
             mkdir -p $temp_backup_dir
64
         fi
64
         fi
65
         cp -f /etc/mumble-server.ini $temp_backup_dir
65
         cp -f /etc/mumble-server.ini $temp_backup_dir
66
         cp -f /var/lib/mumble-server/mumble-server.sqlite $temp_backup_dir
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
         echo $"Mumble settings backup complete"
68
         echo $"Mumble settings backup complete"
69
     fi
69
     fi
70
 }
70
 }
71
 
71
 
72
 function restore_local_mumble {
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
         function_check restore_directory_from_usb
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
         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
78
         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
79
         if [ ! "$?" = "0" ]; then
79
         if [ ! "$?" = "0" ]; then
80
             rm -rf $temp_restore_dir
80
             rm -rf $temp_restore_dir
103
 
103
 
104
 function backup_remote_mumble {
104
 function backup_remote_mumble {
105
     if [ -f /etc/mumble-server.ini ]; then
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
         fi
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
     fi
114
     fi
115
 }
115
 }
116
 
116
 
117
 function restore_remote_mumble {
117
 function restore_remote_mumble {
118
-    if [ -d $SERVER_DIRECTORY/backup/voip ]; then
118
+    if [ -d $SERVER_DIRECTORY/backup/mumble ]; then
119
         echo $"Restoring Mumble settings"
119
         echo $"Restoring Mumble settings"
120
-        temp_restore_dir=/root/tempvoip
120
+        temp_restore_dir=/root/tempmumble
121
         function_check restore_directory_from_friend
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
         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
123
         cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
124
         if [ ! "$?" = "0" ]; then
124
         if [ ! "$?" = "0" ]; then
125
             rm -rf $temp_restore_dir
125
             rm -rf $temp_restore_dir
150
     fi
150
     fi
151
     apt-get -y remove --purge mumble-server
151
     apt-get -y remove --purge mumble-server
152
     if [[ $ONION_ONLY == "no" ]]; then
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
         function_check save_firewall_settings
155
         function_check save_firewall_settings
156
         save_firewall_settings
156
         save_firewall_settings
157
     fi
157
     fi
159
         rm /etc/mumble-server.ini
159
         rm /etc/mumble-server.ini
160
     fi
160
     fi
161
     function_check remove_onion_service
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
     if [ -f /home/$MY_USERNAME/README ]; then
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
             fi
171
             fi
175
         else
172
         else
176
             if grep -q "Mumble server password" /home/$MY_USERNAME/README; then
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
                 fi
176
                 fi
180
             fi
177
             fi
181
         fi
178
         fi
182
     fi
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
         return
184
         return
188
     fi
185
     fi
189
     if [[ $ONION_ONLY != "no" ]]; then
186
     if [[ $ONION_ONLY != "no" ]]; then
190
         return
187
         return
191
     fi
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
     function_check save_firewall_settings
191
     function_check save_firewall_settings
195
     save_firewall_settings
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
 function install_mumble {
198
 function install_mumble {
202
     apt-get -y install mumble-server
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
         if [ -f $IMAGE_PASSWORD_FILE ]; then
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
         else
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
             fi
210
             fi
214
         fi
211
         fi
215
     fi
212
     fi
223
 
220
 
224
     # Check that the cert was created
221
     # Check that the cert was created
225
     if [ ! -f /etc/ssl/certs/mumble.crt ]; then
222
     if [ ! -f /etc/ssl/certs/mumble.crt ]; then
226
-        echo $'VoIP server certificate not created'
223
+        echo $'mumble server certificate not created'
227
         exit 57892
224
         exit 57892
228
     fi
225
     fi
229
     if [ ! -f /etc/ssl/private/mumble.key ]; then
226
     if [ ! -f /etc/ssl/private/mumble.key ]; then
230
-        echo $'VoIP server key not created'
227
+        echo $'mumble server key not created'
231
         exit 57893
228
         exit 57893
232
     fi
229
     fi
233
     if [ ! -d /var/lib/mumble-server ]; then
230
     if [ ! -d /var/lib/mumble-server ]; then
237
     cp /etc/ssl/private/mumble.key /var/lib/mumble-server
234
     cp /etc/ssl/private/mumble.key /var/lib/mumble-server
238
     chown -R mumble-server:mumble-server /var/lib/mumble-server
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
     fi
241
     fi
245
 
242
 
246
     sed -i 's|#autobanAttempts.*|autobanAttempts = 10|g' /etc/mumble-server.ini
243
     sed -i 's|#autobanAttempts.*|autobanAttempts = 10|g' /etc/mumble-server.ini
262
     sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini
259
     sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini
263
     sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
260
     sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
264
     sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
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
     systemctl restart mumble-server
266
     systemctl restart mumble-server
270
 
267
 
273
         echo '' >> /home/$MY_USERNAME/README
270
         echo '' >> /home/$MY_USERNAME/README
274
         echo $'Mumble Server' >> /home/$MY_USERNAME/README
271
         echo $'Mumble Server' >> /home/$MY_USERNAME/README
275
         echo '=============' >> /home/$MY_USERNAME/README
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
         echo $'Mumble server username: mumble-server' >> /home/$MY_USERNAME/README
274
         echo $'Mumble server username: mumble-server' >> /home/$MY_USERNAME/README
278
         if [[ $SYSTEM_TYPE != "VARIANT_MESH" ]]; then
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
         fi
277
         fi
281
         echo '' >> /home/$MY_USERNAME/README
278
         echo '' >> /home/$MY_USERNAME/README
282
         echo $'To connect to the Mumble server use your username and the server password shown above.' >> /home/$MY_USERNAME/README
279
         echo $'To connect to the Mumble server use your username and the server password shown above.' >> /home/$MY_USERNAME/README
284
         chmod 600 /home/$MY_USERNAME/README
281
         chmod 600 /home/$MY_USERNAME/README
285
     fi
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
 # NOTE: deliberately no exit 0
288
 # NOTE: deliberately no exit 0

+ 23
- 23
src/freedombone-app-sip 查看文件

33
 SIP_SERVER_PASSWORD=
33
 SIP_SERVER_PASSWORD=
34
 SIP_PORT=5060
34
 SIP_PORT=5060
35
 SIP_TLS_PORT=5061
35
 SIP_TLS_PORT=5061
36
-VOIP_TURN_PORT=3478
37
-VOIP_TURN_TLS_PORT=5349
38
-VOIP_TURN_NONCE=
36
+TURN_PORT=3478
37
+TURN_TLS_PORT=5349
38
+TURN_NONCE=
39
 
39
 
40
 function install_interactive_sip {
40
 function install_interactive_sip {
41
     echo -n ''
41
     echo -n ''
110
     if [[ $(app_is_installed sip) == "0" ]]; then
110
     if [[ $(app_is_installed sip) == "0" ]]; then
111
         return
111
         return
112
     fi
112
     fi
113
-    iptables -D INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT
114
-    iptables -D INPUT -p tcp --dport $VOIP_TURN_PORT -j ACCEPT
115
-    iptables -D INPUT -p tcp --dport $VOIP_TURN_TLS_PORT -j ACCEPT
113
+    iptables -D INPUT -p udp --dport $TURN_PORT -j ACCEPT
114
+    iptables -D INPUT -p tcp --dport $TURN_PORT -j ACCEPT
115
+    iptables -D INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT
116
     iptables -D INPUT -p udp --dport $SIP_PORT -j ACCEPT
116
     iptables -D INPUT -p udp --dport $SIP_PORT -j ACCEPT
117
     iptables -D INPUT -p tcp --dport $SIP_PORT -j ACCEPT
117
     iptables -D INPUT -p tcp --dport $SIP_PORT -j ACCEPT
118
     iptables -D INPUT -p udp --dport $SIP_TLS_PORT -j ACCEPT
118
     iptables -D INPUT -p udp --dport $SIP_TLS_PORT -j ACCEPT
132
         rm -rf /etc/turnserver
132
         rm -rf /etc/turnserver
133
     fi
133
     fi
134
     sed -i '/install_sip/d' $COMPLETION_FILE
134
     sed -i '/install_sip/d' $COMPLETION_FILE
135
-    sed -i '/configure_firewall_for_voip_turn/d' $COMPLETION_FILE
135
+    sed -i '/configure_firewall_for_turn/d' $COMPLETION_FILE
136
     sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE
136
     sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE
137
 }
137
 }
138
 
138
 
139
-function configure_firewall_for_voip_turn {
140
-    if grep -Fxq "configure_firewall_for_voip_turn" $COMPLETION_FILE; then
139
+function configure_firewall_for_turn {
140
+    if grep -Fxq "configure_firewall_for_turn" $COMPLETION_FILE; then
141
         return
141
         return
142
     fi
142
     fi
143
     if [[ $ONION_ONLY != "no" ]]; then
143
     if [[ $ONION_ONLY != "no" ]]; then
144
         return
144
         return
145
     fi
145
     fi
146
-    iptables -A INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT
147
-    iptables -A INPUT -p tcp --dport $VOIP_TURN_PORT -j ACCEPT
148
-    iptables -A INPUT -p tcp --dport $VOIP_TURN_TLS_PORT -j ACCEPT
146
+    iptables -A INPUT -p udp --dport $TURN_PORT -j ACCEPT
147
+    iptables -A INPUT -p tcp --dport $TURN_PORT -j ACCEPT
148
+    iptables -A INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT
149
     function_check save_firewall_settings
149
     function_check save_firewall_settings
150
     save_firewall_settings
150
     save_firewall_settings
151
 
151
 
152
-    OPEN_PORTS+=("TURN     $VOIP_TURN_PORT")
153
-    OPEN_PORTS+=("TURN TLS $VOIP_TURN_TLS_PORT")
154
-    echo 'configure_firewall_for_voip_turn' >> $COMPLETION_FILE
152
+    OPEN_PORTS+=("TURN     $TURN_PORT")
153
+    OPEN_PORTS+=("TURN TLS $TURN_TLS_PORT")
154
+    echo 'configure_firewall_for_turn' >> $COMPLETION_FILE
155
 }
155
 }
156
 
156
 
157
 
157
 
312
     apt-get -y install turnserver
312
     apt-get -y install turnserver
313
 
313
 
314
     # create a nonce if needed
314
     # create a nonce if needed
315
-    if [ ! $VOIP_TURN_NONCE ]; then
316
-        VOIP_TURN_NONCE="$(create_password 30)"
315
+    if [ ! $TURN_NONCE ]; then
316
+        TURN_NONCE="$(create_password 30)"
317
     fi
317
     fi
318
 
318
 
319
     function_check create_site_certificate
319
     function_check create_site_certificate
334
     echo "#listen_addressv6 = { \"2001:db8::1\" }" >> /etc/turnserver/turnserver.conf
334
     echo "#listen_addressv6 = { \"2001:db8::1\" }" >> /etc/turnserver/turnserver.conf
335
     echo '' >> /etc/turnserver/turnserver.conf
335
     echo '' >> /etc/turnserver/turnserver.conf
336
     echo '## UDP listening port.' >> /etc/turnserver/turnserver.conf
336
     echo '## UDP listening port.' >> /etc/turnserver/turnserver.conf
337
-    echo "udp_port = $VOIP_TURN_PORT" >> /etc/turnserver/turnserver.conf
337
+    echo "udp_port = $TURN_PORT" >> /etc/turnserver/turnserver.conf
338
     echo '' >> /etc/turnserver/turnserver.conf
338
     echo '' >> /etc/turnserver/turnserver.conf
339
     echo '## TCP listening port.' >> /etc/turnserver/turnserver.conf
339
     echo '## TCP listening port.' >> /etc/turnserver/turnserver.conf
340
-    echo "tcp_port = $VOIP_TURN_PORT" >> /etc/turnserver/turnserver.conf
340
+    echo "tcp_port = $TURN_PORT" >> /etc/turnserver/turnserver.conf
341
     echo '' >> /etc/turnserver/turnserver.conf
341
     echo '' >> /etc/turnserver/turnserver.conf
342
     echo '## TLS listening port.' >> /etc/turnserver/turnserver.conf
342
     echo '## TLS listening port.' >> /etc/turnserver/turnserver.conf
343
-    echo "tls_port = $VOIP_TURN_TLS_PORT" >> /etc/turnserver/turnserver.conf
343
+    echo "tls_port = $TURN_TLS_PORT" >> /etc/turnserver/turnserver.conf
344
     echo '' >> /etc/turnserver/turnserver.conf
344
     echo '' >> /etc/turnserver/turnserver.conf
345
     echo '## TLS support.' >> /etc/turnserver/turnserver.conf
345
     echo '## TLS support.' >> /etc/turnserver/turnserver.conf
346
     echo 'tls = true' >> /etc/turnserver/turnserver.conf
346
     echo 'tls = true' >> /etc/turnserver/turnserver.conf
380
     echo "realm = \"$DEFAULT_DOMAIN_NAME\"" >> /etc/turnserver/turnserver.conf
380
     echo "realm = \"$DEFAULT_DOMAIN_NAME\"" >> /etc/turnserver/turnserver.conf
381
     echo '' >> /etc/turnserver/turnserver.conf
381
     echo '' >> /etc/turnserver/turnserver.conf
382
     echo '## Nonce key.' >> /etc/turnserver/turnserver.conf
382
     echo '## Nonce key.' >> /etc/turnserver/turnserver.conf
383
-    echo "nonce_key = \"$VOIP_TURN_NONCE\"" >> /etc/turnserver/turnserver.conf
383
+    echo "nonce_key = \"$TURN_NONCE\"" >> /etc/turnserver/turnserver.conf
384
     echo '' >> /etc/turnserver/turnserver.conf
384
     echo '' >> /etc/turnserver/turnserver.conf
385
     echo '## Max relay per username.' >> /etc/turnserver/turnserver.conf
385
     echo '## Max relay per username.' >> /etc/turnserver/turnserver.conf
386
     echo 'max_relay_per_username = 5' >> /etc/turnserver/turnserver.conf
386
     echo 'max_relay_per_username = 5' >> /etc/turnserver/turnserver.conf
440
 
440
 
441
     systemctl restart turnserver
441
     systemctl restart turnserver
442
 
442
 
443
-    function_check configure_firewall_for_voip_turn
444
-    configure_firewall_for_voip_turn
443
+    function_check configure_firewall_for_turn
444
+    configure_firewall_for_turn
445
     install_completed sip_turn
445
     install_completed sip_turn
446
 }
446
 }
447
 
447
 

+ 2
- 2
src/freedombone-config 查看文件

1928
                 if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1928
                 if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
1929
                     dialog --backtitle $"Freedombone Configuration" \
1929
                     dialog --backtitle $"Freedombone Configuration" \
1930
                            --title $"Your main domain name" \
1930
                            --title $"Your main domain name" \
1931
-                           --form $"\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
1931
+                           --form $"\nWhich domain name should your email/XMPP/IRC/Mumble be associated with?" 11 55 3 \
1932
                            $"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \
1932
                            $"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \
1933
                            $"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \
1933
                            $"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \
1934
                            2> $data
1934
                            2> $data
1947
                     fi
1947
                     fi
1948
                 else
1948
                 else
1949
                     dialog --backtitle $"Freedombone Configuration" \
1949
                     dialog --backtitle $"Freedombone Configuration" \
1950
-                           --inputbox $"Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
1950
+                           --inputbox $"Which domain name should your email/XMPP/IRC/Mumble be associated with?" 10 45 \
1951
                            "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1951
                            "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
1952
                     sel=$?
1952
                     sel=$?
1953
                     case $sel in
1953
                     case $sel in

+ 8
- 16
src/freedombone-controlpanel 查看文件

55
 # Minimum number of characters in a password
55
 # Minimum number of characters in a password
56
 MINIMUM_PASSWORD_LENGTH=$(cat /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
56
 MINIMUM_PASSWORD_LENGTH=$(cat /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
57
 
57
 
58
-# voip
59
-VOIP_PORT=64738
60
-VOIP_ONION_PORT=8095
58
+# Mumble
59
+MUMBLE_PORT=64738
60
+MUMBLE_ONION_PORT=8095
61
 
61
 
62
 SSH_PORT=2222
62
 SSH_PORT=2222
63
 
63
 
345
                 if grep -q "${app_name_first_upper} domain" $COMPLETION_FILE; then
345
                 if grep -q "${app_name_first_upper} domain" $COMPLETION_FILE; then
346
                     app_name=${app_name_first_upper}
346
                     app_name=${app_name_first_upper}
347
                 else
347
                 else
348
-                    if [[ ${app_name} == "mumble" ]]; then
349
-                        app_name="VoIP"
348
+                    if [[ ${app_name} == "searx" ]]; then
349
+                        app_name="Search engine"
350
                     else
350
                     else
351
-                        if [[ ${app_name} == "gnusocial" ]]; then
352
-                            app_name="GNU Social"
353
-                        else
354
-                            if [[ ${app_name} == "searx" ]]; then
355
-                                app_name="Search engine"
356
-                            else
357
-                                app_name=''
358
-                            fi
359
-                        fi
351
+                        app_name=''
360
                     fi
352
                     fi
361
                 fi
353
                 fi
362
             fi
354
             fi
1089
                26 $"CJDNS" off \
1081
                26 $"CJDNS" off \
1090
                27 $"Email" off \
1082
                27 $"Email" off \
1091
                28 $"DLNA" off \
1083
                28 $"DLNA" off \
1092
-               29 $"VoIP" off \
1084
+               29 $"Mumble" off \
1093
                30 $"RSS reader" off \
1085
                30 $"RSS reader" off \
1094
                31 $"Tox" off 2> $data
1086
                31 $"Tox" off 2> $data
1095
         sel=$?
1087
         sel=$?
1131
             26) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
1123
             26) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
1132
             27) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
1124
             27) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
1133
             28) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
1125
             28) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
1134
-            29) ${PROJECT_NAME}-restore-remote $remote_domain_name voip;;
1126
+            29) ${PROJECT_NAME}-restore-remote $remote_domain_name mumble;;
1135
             30) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
1127
             30) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
1136
             31) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
1128
             31) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
1137
         esac
1129
         esac

+ 1
- 1
src/freedombone-image-customise 查看文件

817
         echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/tox.desktop
817
         echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/tox.desktop
818
         echo 'Name=Chat' >> /home/$MY_USERNAME/Desktop/tox.desktop
818
         echo 'Name=Chat' >> /home/$MY_USERNAME/Desktop/tox.desktop
819
         echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/tox.desktop
819
         echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/tox.desktop
820
-        echo 'Comment=Chat, VoIP and Video' >> /home/$MY_USERNAME/Desktop/tox.desktop
820
+        echo 'Comment=Chat, Voice and Video' >> /home/$MY_USERNAME/Desktop/tox.desktop
821
         echo 'Exec=bash /home/$MY_USERNAME/runtox' >> /home/$MY_USERNAME/Desktop/tox.desktop
821
         echo 'Exec=bash /home/$MY_USERNAME/runtox' >> /home/$MY_USERNAME/Desktop/tox.desktop
822
         echo "Icon=/usr/share/$PROJECT_NAME/avatars/chat.png" >> /home/$MY_USERNAME/Desktop/tox.desktop
822
         echo "Icon=/usr/share/$PROJECT_NAME/avatars/chat.png" >> /home/$MY_USERNAME/Desktop/tox.desktop
823
         echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/tox.desktop
823
         echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/tox.desktop

+ 1
- 1
src/freedombone-mesh 查看文件

343
 
343
 
344
 echo ''
344
 echo ''
345
 echo $'Choose communication service:'
345
 echo $'Choose communication service:'
346
-echo $'    1. VoIP'
346
+echo $'    1. Voice'
347
 echo $'    2. Tox Chat'
347
 echo $'    2. Tox Chat'
348
 echo ''
348
 echo ''
349
 
349
 

+ 538
- 538
src/freedombone-utils-config
文件差异内容过多而无法显示
查看文件


+ 47
- 47
src/freedombone-utils-help 查看文件

29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
 function show_help {
31
 function show_help {
32
-	echo ''
33
-	echo $"${PROJECT_NAME} -c [configuration file]"
34
-	echo ''
35
-	echo $'  -h --help             Show help'
36
-	echo $'     menuconfig         Easy interactive installation'
37
-	echo $'     menuconfig-full    Full interactive installation'
38
-	echo $'     menuconfig-onion   Interactive installation for onion-only sites'
39
-	echo $'  -c --config           Installing from a configuration file'
40
-	echo $'     --bbb              Installing on Beaglebone Black'
41
-	echo $'  -u --user             User to install the system as'
42
-	echo $'  -d --domain           Default domain name'
43
-	echo $'  -s --system           System type'
44
-	echo $'     --ip               Static LAN IP address of the system'
45
-	echo $'     --iprouter         LAN IP address of the internet router'
46
-	echo $'     --ddns             Dynamic DNS provider domain'
47
-	echo $'     --ddnsuser         Dynamic DNS provider username'
48
-	echo $'     --ddnspass         Dynamic DNS provider password'
49
-	echo ''
50
-	echo $'     --microblogdomain  Microblog domain name'
51
-	echo $'     --wikidomain       Wiki domain name'
52
-	echo $'     --blogdomain       Blog domain name'
53
-	echo $'     --hubzilladomain   Hubzilla domain name'
54
-	echo $'     --gitdomain        Git hosting domain name'
55
-	echo $'  -t --time             Domain used as a TLS time source'
56
-	echo $'     --ssh              ssh port number'
57
-	echo $'     --list             Public mailing list name'
58
-	echo $'     --cores            Number of CPU cores'
59
-	echo $'     --name             Your name'
60
-	echo $'     --email            Your email address'
61
-	echo $'     --usb              Path for the USB drive (eg. /dev/sdb1)'
62
-	echo $'     --cjdns            Enable CJDNS'
63
-	echo $'     --vpass            VoIP server password'
64
-	echo $'     --vport            VoIP server port'
65
-	echo $'     --ns1              First DNS nameserver'
66
-	echo $'     --ns2              Second DNS nameserver'
67
-	echo $'     --repo             Debian repository'
68
-	echo ''
69
-	echo $'system types'
70
-	echo '------------'
71
-	echo $'This can either be blank if you wish to install the full system,'
72
-	echo $"or for more specialised variants you can specify '$VARIANT_MAILBOX', '$VARIANT_CLOUD',"
73
-	echo $"'$VARIANT_CHAT', '$VARIANT_SOCIAL', '$VARIANT_MEDIA', '$VARIANT_WRITER', '$VARIANT_DEVELOPER'"
74
-	echo $"or '$VARIANT_MESH'."
75
-	echo ''
76
-	echo $"If you wish to install everything except email then use the '$VARIANT_NONMAILBOX' variaint."
77
-	echo ''
78
-	exit 0
32
+    echo ''
33
+    echo $"${PROJECT_NAME} -c [configuration file]"
34
+    echo ''
35
+    echo $'  -h --help             Show help'
36
+    echo $'     menuconfig         Easy interactive installation'
37
+    echo $'     menuconfig-full    Full interactive installation'
38
+    echo $'     menuconfig-onion   Interactive installation for onion-only sites'
39
+    echo $'  -c --config           Installing from a configuration file'
40
+    echo $'     --bbb              Installing on Beaglebone Black'
41
+    echo $'  -u --user             User to install the system as'
42
+    echo $'  -d --domain           Default domain name'
43
+    echo $'  -s --system           System type'
44
+    echo $'     --ip               Static LAN IP address of the system'
45
+    echo $'     --iprouter         LAN IP address of the internet router'
46
+    echo $'     --ddns             Dynamic DNS provider domain'
47
+    echo $'     --ddnsuser         Dynamic DNS provider username'
48
+    echo $'     --ddnspass         Dynamic DNS provider password'
49
+    echo ''
50
+    echo $'     --microblogdomain  Microblog domain name'
51
+    echo $'     --wikidomain       Wiki domain name'
52
+    echo $'     --blogdomain       Blog domain name'
53
+    echo $'     --hubzilladomain   Hubzilla domain name'
54
+    echo $'     --gitdomain        Git hosting domain name'
55
+    echo $'  -t --time             Domain used as a TLS time source'
56
+    echo $'     --ssh              ssh port number'
57
+    echo $'     --list             Public mailing list name'
58
+    echo $'     --cores            Number of CPU cores'
59
+    echo $'     --name             Your name'
60
+    echo $'     --email            Your email address'
61
+    echo $'     --usb              Path for the USB drive (eg. /dev/sdb1)'
62
+    echo $'     --cjdns            Enable CJDNS'
63
+    echo $'     --vpass            Mumble server password'
64
+    echo $'     --vport            Mumble server port'
65
+    echo $'     --ns1              First DNS nameserver'
66
+    echo $'     --ns2              Second DNS nameserver'
67
+    echo $'     --repo             Debian repository'
68
+    echo ''
69
+    echo $'system types'
70
+    echo '------------'
71
+    echo $'This can either be blank if you wish to install the full system,'
72
+    echo $"or for more specialised variants you can specify '$VARIANT_MAILBOX', '$VARIANT_CLOUD',"
73
+    echo $"'$VARIANT_CHAT', '$VARIANT_SOCIAL', '$VARIANT_MEDIA', '$VARIANT_WRITER', '$VARIANT_DEVELOPER'"
74
+    echo $"or '$VARIANT_MESH'."
75
+    echo ''
76
+    echo $"If you wish to install everything except email then use the '$VARIANT_NONMAILBOX' variaint."
77
+    echo ''
78
+    exit 0
79
 }
79
 }
80
 
80
 
81
 # NOTE: deliberately no exit 0
81
 # NOTE: deliberately no exit 0

+ 3
- 0
src/freedombone-utils-upgrade 查看文件

61
     sed -i 's|install_gnu_social_theme|install_gnusocial_theme|g' $COMPLETION_FILE
61
     sed -i 's|install_gnu_social_theme|install_gnusocial_theme|g' $COMPLETION_FILE
62
     sed -i 's|install_gnu_social|install_gnusocial|g' $COMPLETION_FILE
62
     sed -i 's|install_gnu_social|install_gnusocial|g' $COMPLETION_FILE
63
     sed -i 's|install_irc_server|install_irc|g' $COMPLETION_FILE
63
     sed -i 's|install_irc_server|install_irc|g' $COMPLETION_FILE
64
+    sed -i 's|voip_turn|turn|g' $COMPLETION_FILE
64
     sed -i 's|install_voip|install_mumble|g' $COMPLETION_FILE
65
     sed -i 's|install_voip|install_mumble|g' $COMPLETION_FILE
65
     sed -i 's|install_rss_reader|install_rss|g' $COMPLETION_FILE
66
     sed -i 's|install_rss_reader|install_rss|g' $COMPLETION_FILE
66
     sed -i 's|install_tox_node|install_tox|g' $COMPLETION_FILE
67
     sed -i 's|install_tox_node|install_tox|g' $COMPLETION_FILE
68
 
69
 
69
     sed -i 's|GNU Social|gnusocial|g' $COMPLETION_FILE
70
     sed -i 's|GNU Social|gnusocial|g' $COMPLETION_FILE
70
     sed -i 's|XMPP|xmpp|g' $COMPLETION_FILE
71
     sed -i 's|XMPP|xmpp|g' $COMPLETION_FILE
72
+    sed -i 's|voip|mumble|g' $COMPLETION_FILE
73
+    sed -i 's|VoIP|mumble|g' $COMPLETION_FILE
71
 
74
 
72
     if [ -f /usr/local/bin/zeronetavahi ]; then
75
     if [ -f /usr/local/bin/zeronetavahi ]; then
73
         rm /usr/local/bin/zeronetavahi
76
         rm /usr/local/bin/zeronetavahi