|
@@ -43,6 +43,10 @@ UPDATE_DATE_SCRIPT=/usr/bin/updatedate
|
43
|
43
|
# Minimum number of characters in a password
|
44
|
44
|
MINIMUM_PASSWORD_LENGTH=8
|
45
|
45
|
|
|
46
|
+# voip
|
|
47
|
+VOIP_PORT=64738
|
|
48
|
+VOIP_ONION_PORT=8095
|
|
49
|
+
|
46
|
50
|
USB_DRIVE=sdb
|
47
|
51
|
# get default USB from config file
|
48
|
52
|
CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg
|
|
@@ -144,6 +148,11 @@ function show_domains {
|
144
|
148
|
echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
|
145
|
149
|
echo "$(cat ${COMPLETION_FILE} | grep 'XMPP onion domain' | awk -F ':' '{print $2}')"
|
146
|
150
|
fi
|
|
151
|
+ if grep -q "VoIP onion domain" $COMPLETION_FILE; then
|
|
152
|
+ echo -n -e "$(pad_string 'VoIP/Mumble')"
|
|
153
|
+ echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
|
|
154
|
+ echo "$(cat ${COMPLETION_FILE} | grep 'VoIP onion domain' | awk -F ':' '{print $2}')"
|
|
155
|
+ fi
|
147
|
156
|
if grep -q "Wiki domain" $COMPLETION_FILE; then
|
148
|
157
|
echo -n -e "$(pad_string 'Wiki')"
|
149
|
158
|
WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}')
|
|
@@ -198,6 +207,7 @@ function show_domains {
|
198
|
207
|
fi
|
199
|
208
|
echo ''
|
200
|
209
|
fi
|
|
210
|
+
|
201
|
211
|
echo ''
|
202
|
212
|
}
|
203
|
213
|
|
|
@@ -1179,6 +1189,33 @@ Enter a static local IP address for this system.\n\nIt will typically be 192.168
|
1179
|
1189
|
fi
|
1180
|
1190
|
}
|
1181
|
1191
|
|
|
1192
|
+function mumble_via_onion {
|
|
1193
|
+ if ! grep -q $"VoIP onion domain" $COMPLETION_FILE; then
|
|
1194
|
+ return
|
|
1195
|
+ fi
|
|
1196
|
+ if [ ! -f /etc/mumble-server.ini ]; then
|
|
1197
|
+ return
|
|
1198
|
+ fi
|
|
1199
|
+ enable_mumble_via_onion="no"
|
|
1200
|
+ dialog --title $"Enable Mumble via onion service" \
|
|
1201
|
+ --backtitle $"Freedombone Control Panel" \
|
|
1202
|
+ --defaultno \
|
|
1203
|
+ --yesno $"Enable Mumble via an onion domain?" 10 60
|
|
1204
|
+ sel=$?
|
|
1205
|
+ case $sel in
|
|
1206
|
+ 0) enable_mumble_via_onion="yes";;
|
|
1207
|
+ 255) return;;
|
|
1208
|
+ esac
|
|
1209
|
+
|
|
1210
|
+ if [[ $enable_mumble_via_onion == "yes" ]]; then
|
|
1211
|
+ sed -i "s|port=.*|port=${VOIP_ONION_PORT}|g" /etc/mumble-server.ini
|
|
1212
|
+ else
|
|
1213
|
+ sed -i "s|port=.*|port=${VOIP_PORT}|g" /etc/mumble-server.ini
|
|
1214
|
+ fi
|
|
1215
|
+
|
|
1216
|
+ systemctl restart mumble-server
|
|
1217
|
+}
|
|
1218
|
+
|
1182
|
1219
|
function menu_backup_restore {
|
1183
|
1220
|
while true
|
1184
|
1221
|
do
|
|
@@ -1322,6 +1359,28 @@ function menu_media {
|
1322
|
1359
|
done
|
1323
|
1360
|
}
|
1324
|
1361
|
|
|
1362
|
+function menu_voip {
|
|
1363
|
+ while true
|
|
1364
|
+ do
|
|
1365
|
+ data=$(tempfile 2>/dev/null)
|
|
1366
|
+ trap "rm -f $data" 0 1 2 5 15
|
|
1367
|
+ dialog --backtitle $"Freedombone Control Panel" \
|
|
1368
|
+ --title $"SIP/VoIP Menu" \
|
|
1369
|
+ --radiolist $"Choose an operation:" 13 70 2 \
|
|
1370
|
+ 1 $"Mumble via onion service" off \
|
|
1371
|
+ 2 $"Exit" on 2> $data
|
|
1372
|
+ sel=$?
|
|
1373
|
+ case $sel in
|
|
1374
|
+ 1) break;;
|
|
1375
|
+ 255) break;;
|
|
1376
|
+ esac
|
|
1377
|
+ case $(cat $data) in
|
|
1378
|
+ 1) mumble_via_onion;;
|
|
1379
|
+ 2) break;;
|
|
1380
|
+ esac
|
|
1381
|
+ done
|
|
1382
|
+}
|
|
1383
|
+
|
1325
|
1384
|
function menu_irc {
|
1326
|
1385
|
while true
|
1327
|
1386
|
do
|
|
@@ -1351,7 +1410,7 @@ function menu_top_level {
|
1351
|
1410
|
trap "rm -f $data" 0 1 2 5 15
|
1352
|
1411
|
dialog --backtitle $"Freedombone Control Panel" \
|
1353
|
1412
|
--title $"Control Panel" \
|
1354
|
|
- --radiolist $"Choose an operation:" 25 70 18 \
|
|
1413
|
+ --radiolist $"Choose an operation:" 26 70 19 \
|
1355
|
1414
|
1 $"About this system" off \
|
1356
|
1415
|
2 $"Backup and Restore" off \
|
1357
|
1416
|
3 $"Reset Tripwire" off \
|
|
@@ -1362,14 +1421,15 @@ function menu_top_level {
|
1362
|
1421
|
8 $"Security Settings" off \
|
1363
|
1422
|
9 $"Hubzilla" off \
|
1364
|
1423
|
10 $"Media menu" off \
|
1365
|
|
- 11 $"IRC menu" off \
|
1366
|
|
- 12 $"Change the name of this system" off \
|
1367
|
|
- 13 $"Set the TLS date/time source" off \
|
1368
|
|
- 14 $"Set a static local IP address" off \
|
1369
|
|
- 15 $"Check for updates" off \
|
1370
|
|
- 16 $"Power off the system" off \
|
1371
|
|
- 17 $"Restart the system" off \
|
1372
|
|
- 18 $"Exit" on 2> $data
|
|
1424
|
+ 11 $"SIP/VoIP menu" off \
|
|
1425
|
+ 12 $"IRC menu" off \
|
|
1426
|
+ 13 $"Change the name of this system" off \
|
|
1427
|
+ 14 $"Set the TLS date/time source" off \
|
|
1428
|
+ 15 $"Set a static local IP address" off \
|
|
1429
|
+ 16 $"Check for updates" off \
|
|
1430
|
+ 17 $"Power off the system" off \
|
|
1431
|
+ 18 $"Restart the system" off \
|
|
1432
|
+ 19 $"Exit" on 2> $data
|
1373
|
1433
|
sel=$?
|
1374
|
1434
|
case $sel in
|
1375
|
1435
|
1) exit 1;;
|
|
@@ -1386,14 +1446,15 @@ function menu_top_level {
|
1386
|
1446
|
8) security_settings;;
|
1387
|
1447
|
9) menu_hubzilla;;
|
1388
|
1448
|
10) menu_media;;
|
1389
|
|
- 11) menu_irc;;
|
1390
|
|
- 12) change_system_name;;
|
1391
|
|
- 13) set_tls_time_source;;
|
1392
|
|
- 14) set_static_IP;;
|
1393
|
|
- 15) check_for_updates;;
|
1394
|
|
- 16) shut_down_system;;
|
1395
|
|
- 17) restart_system;;
|
1396
|
|
- 18) break;;
|
|
1449
|
+ 11) menu_voip;;
|
|
1450
|
+ 12) menu_irc;;
|
|
1451
|
+ 13) change_system_name;;
|
|
1452
|
+ 14) set_tls_time_source;;
|
|
1453
|
+ 15) set_static_IP;;
|
|
1454
|
+ 16) check_for_updates;;
|
|
1455
|
+ 17) shut_down_system;;
|
|
1456
|
+ 18) restart_system;;
|
|
1457
|
+ 19) break;;
|
1397
|
1458
|
esac
|
1398
|
1459
|
done
|
1399
|
1460
|
}
|