Change voip to mumble for more consistent terminology
This commit is contained in:
parent
56954a59bb
commit
71a93bac16
|
@ -192,15 +192,15 @@ else
|
||||||
shift
|
shift
|
||||||
ENABLE_BABEL="yes"
|
ENABLE_BABEL="yes"
|
||||||
;;
|
;;
|
||||||
# VoIP server password
|
# Mumble server password
|
||||||
--vpass)
|
--vpass)
|
||||||
shift
|
shift
|
||||||
VOIP_SERVER_PASSWORD=$1
|
MUMBLE_SERVER_PASSWORD=$1
|
||||||
;;
|
;;
|
||||||
# VoIP server port
|
# Mumble server port
|
||||||
--vport)
|
--vport)
|
||||||
shift
|
shift
|
||||||
VOIP_PORT=$1
|
MUMBLE_PORT=$1
|
||||||
;;
|
;;
|
||||||
# DNS Nameserver 1
|
# DNS Nameserver 1
|
||||||
--ns1)
|
--ns1)
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
|
|
||||||
VARIANTS='full chat'
|
VARIANTS='full chat'
|
||||||
|
|
||||||
# Password used for VoIP server
|
# Password used for mumble server
|
||||||
VOIP_SERVER_PASSWORD=
|
MUMBLE_SERVER_PASSWORD=
|
||||||
# Port on which VoIP server listens
|
# Port on which mumble server listens
|
||||||
VOIP_PORT=64738
|
MUMBLE_PORT=64738
|
||||||
|
|
||||||
# Location of VoIP database and configuration
|
# Location of mumble database and configuration
|
||||||
VOIP_DATABASE="mumble-server.sqlite"
|
MUMBLE_DATABASE="mumble-server.sqlite"
|
||||||
VOIP_CONFIG_FILE="mumble-server.ini"
|
MUMBLE_CONFIG_FILE="mumble-server.ini"
|
||||||
|
|
||||||
function install_interactive_mumble {
|
function install_interactive_mumble {
|
||||||
echo -n ''
|
echo -n ''
|
||||||
|
@ -58,23 +58,23 @@ function upgrade_mumble {
|
||||||
function backup_local_mumble {
|
function backup_local_mumble {
|
||||||
if [ -f /etc/mumble-server.ini ]; then
|
if [ -f /etc/mumble-server.ini ]; then
|
||||||
echo $"Backing up Mumble settings"
|
echo $"Backing up Mumble settings"
|
||||||
temp_backup_dir=/root/tempvoipbackup
|
temp_backup_dir=/root/tempmumblebackup
|
||||||
if [ ! -d $temp_backup_dir ]; then
|
if [ ! -d $temp_backup_dir ]; then
|
||||||
mkdir -p $temp_backup_dir
|
mkdir -p $temp_backup_dir
|
||||||
fi
|
fi
|
||||||
cp -f /etc/mumble-server.ini $temp_backup_dir
|
cp -f /etc/mumble-server.ini $temp_backup_dir
|
||||||
cp -f /var/lib/mumble-server/mumble-server.sqlite $temp_backup_dir
|
cp -f /var/lib/mumble-server/mumble-server.sqlite $temp_backup_dir
|
||||||
backup_directory_to_usb $temp_backup_dir voip
|
backup_directory_to_usb $temp_backup_dir mumble
|
||||||
echo $"Mumble settings backup complete"
|
echo $"Mumble settings backup complete"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_local_mumble {
|
function restore_local_mumble {
|
||||||
if [ -d $USB_MOUNT/backup/voip ]; then
|
if [ -d $USB_MOUNT/backup/mumble ]; then
|
||||||
echo $"Restoring VoIP settings"
|
echo $"Restoring mumble settings"
|
||||||
temp_restore_dir=/root/tempvoip
|
temp_restore_dir=/root/tempmumble
|
||||||
function_check restore_directory_from_usb
|
function_check restore_directory_from_usb
|
||||||
restore_directory_from_usb $temp_restore_dir voip
|
restore_directory_from_usb $temp_restore_dir mumble
|
||||||
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
|
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
rm -rf $temp_restore_dir
|
rm -rf $temp_restore_dir
|
||||||
|
@ -103,23 +103,23 @@ function restore_local_mumble {
|
||||||
|
|
||||||
function backup_remote_mumble {
|
function backup_remote_mumble {
|
||||||
if [ -f /etc/mumble-server.ini ]; then
|
if [ -f /etc/mumble-server.ini ]; then
|
||||||
echo $"Backing up VoIP settings"
|
echo $"Backing up mumble settings"
|
||||||
if [ ! -d /root/tempvoipbackup ]; then
|
if [ ! -d /root/tempmumblebackup ]; then
|
||||||
mkdir -p /root/tempvoipbackup
|
mkdir -p /root/tempmumblebackup
|
||||||
fi
|
fi
|
||||||
cp -f /etc/mumble-server.ini /root/tempvoipbackup
|
cp -f /etc/mumble-server.ini /root/tempmumblebackup
|
||||||
cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
|
cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempmumblebackup
|
||||||
backup_directory_to_friend /root/tempvoipbackup voip
|
backup_directory_to_friend /root/tempmumblebackup mumble
|
||||||
echo $"Backup of VoIP settings complete"
|
echo $"Backup of mumble settings complete"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_remote_mumble {
|
function restore_remote_mumble {
|
||||||
if [ -d $SERVER_DIRECTORY/backup/voip ]; then
|
if [ -d $SERVER_DIRECTORY/backup/mumble ]; then
|
||||||
echo $"Restoring Mumble settings"
|
echo $"Restoring Mumble settings"
|
||||||
temp_restore_dir=/root/tempvoip
|
temp_restore_dir=/root/tempmumble
|
||||||
function_check restore_directory_from_friend
|
function_check restore_directory_from_friend
|
||||||
restore_directory_from_friend $temp_restore_dir voip
|
restore_directory_from_friend $temp_restore_dir mumble
|
||||||
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
|
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/mumble-server.ini /etc/
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
rm -rf $temp_restore_dir
|
rm -rf $temp_restore_dir
|
||||||
|
@ -150,8 +150,8 @@ function remove_mumble {
|
||||||
fi
|
fi
|
||||||
apt-get -y remove --purge mumble-server
|
apt-get -y remove --purge mumble-server
|
||||||
if [[ $ONION_ONLY == "no" ]]; then
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
iptables -D INPUT -p udp --dport $VOIP_PORT -j ACCEPT
|
iptables -D INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p tcp --dport $VOIP_PORT -j ACCEPT
|
iptables -D INPUT -p tcp --dport $MUMBLE_PORT -j ACCEPT
|
||||||
function_check save_firewall_settings
|
function_check save_firewall_settings
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
fi
|
fi
|
||||||
|
@ -159,57 +159,54 @@ function remove_mumble {
|
||||||
rm /etc/mumble-server.ini
|
rm /etc/mumble-server.ini
|
||||||
fi
|
fi
|
||||||
function_check remove_onion_service
|
function_check remove_onion_service
|
||||||
remove_onion_service voip ${VOIP_PORT}
|
remove_onion_service mumble ${MUMBLE_PORT}
|
||||||
sed -i '/install_mumble/d' $COMPLETION_FILE
|
sed -i '/mumble/d' $COMPLETION_FILE
|
||||||
sed -i '/install_voip/d' $COMPLETION_FILE
|
|
||||||
sed -i '/configure_firewall_for_voip/d' $COMPLETION_FILE
|
|
||||||
sed -i '/VoIP /d' $COMPLETION_FILE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_voip_server_password {
|
function get_mumble_server_password {
|
||||||
if [ -f /home/$MY_USERNAME/README ]; then
|
if [ -f /home/$MY_USERNAME/README ]; then
|
||||||
if grep -q "VoIP server password" /home/$MY_USERNAME/README; then
|
if grep -q "mumble server password" /home/$MY_USERNAME/README; then
|
||||||
if [ ! $VOIP_SERVER_PASSWORD ]; then
|
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
|
||||||
VOIP_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "VoIP server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if grep -q "Mumble server password" /home/$MY_USERNAME/README; then
|
if grep -q "Mumble server password" /home/$MY_USERNAME/README; then
|
||||||
if [ ! $VOIP_SERVER_PASSWORD ]; then
|
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
|
||||||
VOIP_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
MUMBLE_SERVER_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "Mumble server password" | awk -F ':' '{print $2}' | sed 's/^ *//')
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_firewall_for_voip {
|
function configure_firewall_for_mumble {
|
||||||
if grep -Fxq "configure_firewall_for_voip" $COMPLETION_FILE; then
|
if grep -Fxq "configure_firewall_for_mumble" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $ONION_ONLY != "no" ]]; then
|
if [[ $ONION_ONLY != "no" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -p udp --dport $VOIP_PORT -j ACCEPT
|
iptables -A INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT
|
||||||
iptables -A INPUT -p tcp --dport $VOIP_PORT -j ACCEPT
|
iptables -A INPUT -p tcp --dport $MUMBLE_PORT -j ACCEPT
|
||||||
function_check save_firewall_settings
|
function_check save_firewall_settings
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
|
||||||
OPEN_PORTS+=("Mumble $VOIP_PORT")
|
OPEN_PORTS+=("Mumble $MUMBLE_PORT")
|
||||||
echo 'configure_firewall_for_voip' >> $COMPLETION_FILE
|
echo 'configure_firewall_for_mumble' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_mumble {
|
function install_mumble {
|
||||||
apt-get -y install mumble-server
|
apt-get -y install mumble-server
|
||||||
|
|
||||||
function_check get_voip_server_password
|
function_check get_mumble_server_password
|
||||||
get_voip_server_password
|
get_mumble_server_password
|
||||||
if [ ! $VOIP_SERVER_PASSWORD ]; then
|
if [ ! $MUMBLE_SERVER_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
VOIP_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
MUMBLE_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
VOIP_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
MUMBLE_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||||
if [ ${#VOIP_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
if [ ${#MUMBLE_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
VOIP_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
MUMBLE_SERVER_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -223,11 +220,11 @@ function install_mumble {
|
||||||
|
|
||||||
# Check that the cert was created
|
# Check that the cert was created
|
||||||
if [ ! -f /etc/ssl/certs/mumble.crt ]; then
|
if [ ! -f /etc/ssl/certs/mumble.crt ]; then
|
||||||
echo $'VoIP server certificate not created'
|
echo $'mumble server certificate not created'
|
||||||
exit 57892
|
exit 57892
|
||||||
fi
|
fi
|
||||||
if [ ! -f /etc/ssl/private/mumble.key ]; then
|
if [ ! -f /etc/ssl/private/mumble.key ]; then
|
||||||
echo $'VoIP server key not created'
|
echo $'mumble server key not created'
|
||||||
exit 57893
|
exit 57893
|
||||||
fi
|
fi
|
||||||
if [ ! -d /var/lib/mumble-server ]; then
|
if [ ! -d /var/lib/mumble-server ]; then
|
||||||
|
@ -237,10 +234,10 @@ function install_mumble {
|
||||||
cp /etc/ssl/private/mumble.key /var/lib/mumble-server
|
cp /etc/ssl/private/mumble.key /var/lib/mumble-server
|
||||||
chown -R mumble-server:mumble-server /var/lib/mumble-server
|
chown -R mumble-server:mumble-server /var/lib/mumble-server
|
||||||
|
|
||||||
sed -i "s|welcometext=.*|welcometext=\"<br />Welcome to $DEFAULT_DOMAIN_NAME <b>VoIP</b>.<br />Chat freely!<br />\"|g" /etc/mumble-server.ini
|
sed -i "s|welcometext=.*|welcometext=\"<br />Welcome to $DEFAULT_DOMAIN_NAME <b>mumble</b>.<br />Chat freely!<br />\"|g" /etc/mumble-server.ini
|
||||||
|
|
||||||
if [[ $VOIP_SERVER_PASSWORD && $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
|
if [[ $MUMBLE_SERVER_PASSWORD && $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
|
||||||
sed -i "s|serverpassword=.*|serverpassword=$VOIP_SERVER_PASSWORD|g" /etc/mumble-server.ini
|
sed -i "s|serverpassword=.*|serverpassword=$MUMBLE_SERVER_PASSWORD|g" /etc/mumble-server.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i 's|#autobanAttempts.*|autobanAttempts = 10|g' /etc/mumble-server.ini
|
sed -i 's|#autobanAttempts.*|autobanAttempts = 10|g' /etc/mumble-server.ini
|
||||||
|
@ -262,9 +259,9 @@ function install_mumble {
|
||||||
sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini
|
sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini
|
||||||
sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
|
sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
|
||||||
sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
|
sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
|
||||||
sed -i "s|port=.*|port=${VOIP_PORT}|g" /etc/mumble-server.ini
|
sed -i "s|port=.*|port=${MUMBLE_PORT}|g" /etc/mumble-server.ini
|
||||||
|
|
||||||
VOIP_ONION_HOSTNAME=$(add_onion_service mumble ${VOIP_PORT} ${VOIP_PORT})
|
MUMBLE_ONION_HOSTNAME=$(add_onion_service mumble ${MUMBLE_PORT} ${MUMBLE_PORT})
|
||||||
|
|
||||||
systemctl restart mumble-server
|
systemctl restart mumble-server
|
||||||
|
|
||||||
|
@ -273,10 +270,10 @@ function install_mumble {
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $'Mumble Server' >> /home/$MY_USERNAME/README
|
echo $'Mumble Server' >> /home/$MY_USERNAME/README
|
||||||
echo '=============' >> /home/$MY_USERNAME/README
|
echo '=============' >> /home/$MY_USERNAME/README
|
||||||
echo $"Mumble onion domain:$VOIP_ONION_HOSTNAME" >> /home/$MY_USERNAME/README
|
echo $"Mumble onion domain:$MUMBLE_ONION_HOSTNAME" >> /home/$MY_USERNAME/README
|
||||||
echo $'Mumble server username: mumble-server' >> /home/$MY_USERNAME/README
|
echo $'Mumble server username: mumble-server' >> /home/$MY_USERNAME/README
|
||||||
if [[ $SYSTEM_TYPE != "VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE != "VARIANT_MESH" ]]; then
|
||||||
echo $"Mumble server password: $VOIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README
|
echo $"Mumble server password: $MUMBLE_SERVER_PASSWORD" >> /home/$MY_USERNAME/README
|
||||||
fi
|
fi
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $'To connect to the Mumble server use your username and the server password shown above.' >> /home/$MY_USERNAME/README
|
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 {
|
||||||
chmod 600 /home/$MY_USERNAME/README
|
chmod 600 /home/$MY_USERNAME/README
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function_check configure_firewall_for_voip
|
function_check configure_firewall_for_mumble
|
||||||
configure_firewall_for_voip
|
configure_firewall_for_mumble
|
||||||
}
|
}
|
||||||
|
|
||||||
# NOTE: deliberately no exit 0
|
# NOTE: deliberately no exit 0
|
||||||
|
|
|
@ -33,9 +33,9 @@ VARIANTS='full chat'
|
||||||
SIP_SERVER_PASSWORD=
|
SIP_SERVER_PASSWORD=
|
||||||
SIP_PORT=5060
|
SIP_PORT=5060
|
||||||
SIP_TLS_PORT=5061
|
SIP_TLS_PORT=5061
|
||||||
VOIP_TURN_PORT=3478
|
TURN_PORT=3478
|
||||||
VOIP_TURN_TLS_PORT=5349
|
TURN_TLS_PORT=5349
|
||||||
VOIP_TURN_NONCE=
|
TURN_NONCE=
|
||||||
|
|
||||||
function install_interactive_sip {
|
function install_interactive_sip {
|
||||||
echo -n ''
|
echo -n ''
|
||||||
|
@ -110,9 +110,9 @@ function remove_sip {
|
||||||
if [[ $(app_is_installed sip) == "0" ]]; then
|
if [[ $(app_is_installed sip) == "0" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -D INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT
|
iptables -D INPUT -p udp --dport $TURN_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p tcp --dport $VOIP_TURN_PORT -j ACCEPT
|
iptables -D INPUT -p tcp --dport $TURN_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p tcp --dport $VOIP_TURN_TLS_PORT -j ACCEPT
|
iptables -D INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p udp --dport $SIP_PORT -j ACCEPT
|
iptables -D INPUT -p udp --dport $SIP_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p tcp --dport $SIP_PORT -j ACCEPT
|
iptables -D INPUT -p tcp --dport $SIP_PORT -j ACCEPT
|
||||||
iptables -D INPUT -p udp --dport $SIP_TLS_PORT -j ACCEPT
|
iptables -D INPUT -p udp --dport $SIP_TLS_PORT -j ACCEPT
|
||||||
|
@ -132,26 +132,26 @@ function remove_sip {
|
||||||
rm -rf /etc/turnserver
|
rm -rf /etc/turnserver
|
||||||
fi
|
fi
|
||||||
sed -i '/install_sip/d' $COMPLETION_FILE
|
sed -i '/install_sip/d' $COMPLETION_FILE
|
||||||
sed -i '/configure_firewall_for_voip_turn/d' $COMPLETION_FILE
|
sed -i '/configure_firewall_for_turn/d' $COMPLETION_FILE
|
||||||
sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE
|
sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_firewall_for_voip_turn {
|
function configure_firewall_for_turn {
|
||||||
if grep -Fxq "configure_firewall_for_voip_turn" $COMPLETION_FILE; then
|
if grep -Fxq "configure_firewall_for_turn" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $ONION_ONLY != "no" ]]; then
|
if [[ $ONION_ONLY != "no" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT
|
iptables -A INPUT -p udp --dport $TURN_PORT -j ACCEPT
|
||||||
iptables -A INPUT -p tcp --dport $VOIP_TURN_PORT -j ACCEPT
|
iptables -A INPUT -p tcp --dport $TURN_PORT -j ACCEPT
|
||||||
iptables -A INPUT -p tcp --dport $VOIP_TURN_TLS_PORT -j ACCEPT
|
iptables -A INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT
|
||||||
function_check save_firewall_settings
|
function_check save_firewall_settings
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
|
||||||
OPEN_PORTS+=("TURN $VOIP_TURN_PORT")
|
OPEN_PORTS+=("TURN $TURN_PORT")
|
||||||
OPEN_PORTS+=("TURN TLS $VOIP_TURN_TLS_PORT")
|
OPEN_PORTS+=("TURN TLS $TURN_TLS_PORT")
|
||||||
echo 'configure_firewall_for_voip_turn' >> $COMPLETION_FILE
|
echo 'configure_firewall_for_turn' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -312,8 +312,8 @@ function install_sip_turn {
|
||||||
apt-get -y install turnserver
|
apt-get -y install turnserver
|
||||||
|
|
||||||
# create a nonce if needed
|
# create a nonce if needed
|
||||||
if [ ! $VOIP_TURN_NONCE ]; then
|
if [ ! $TURN_NONCE ]; then
|
||||||
VOIP_TURN_NONCE="$(create_password 30)"
|
TURN_NONCE="$(create_password 30)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function_check create_site_certificate
|
function_check create_site_certificate
|
||||||
|
@ -334,13 +334,13 @@ function install_sip_turn {
|
||||||
echo "#listen_addressv6 = { \"2001:db8::1\" }" >> /etc/turnserver/turnserver.conf
|
echo "#listen_addressv6 = { \"2001:db8::1\" }" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## UDP listening port.' >> /etc/turnserver/turnserver.conf
|
echo '## UDP listening port.' >> /etc/turnserver/turnserver.conf
|
||||||
echo "udp_port = $VOIP_TURN_PORT" >> /etc/turnserver/turnserver.conf
|
echo "udp_port = $TURN_PORT" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## TCP listening port.' >> /etc/turnserver/turnserver.conf
|
echo '## TCP listening port.' >> /etc/turnserver/turnserver.conf
|
||||||
echo "tcp_port = $VOIP_TURN_PORT" >> /etc/turnserver/turnserver.conf
|
echo "tcp_port = $TURN_PORT" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## TLS listening port.' >> /etc/turnserver/turnserver.conf
|
echo '## TLS listening port.' >> /etc/turnserver/turnserver.conf
|
||||||
echo "tls_port = $VOIP_TURN_TLS_PORT" >> /etc/turnserver/turnserver.conf
|
echo "tls_port = $TURN_TLS_PORT" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## TLS support.' >> /etc/turnserver/turnserver.conf
|
echo '## TLS support.' >> /etc/turnserver/turnserver.conf
|
||||||
echo 'tls = true' >> /etc/turnserver/turnserver.conf
|
echo 'tls = true' >> /etc/turnserver/turnserver.conf
|
||||||
|
@ -380,7 +380,7 @@ function install_sip_turn {
|
||||||
echo "realm = \"$DEFAULT_DOMAIN_NAME\"" >> /etc/turnserver/turnserver.conf
|
echo "realm = \"$DEFAULT_DOMAIN_NAME\"" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## Nonce key.' >> /etc/turnserver/turnserver.conf
|
echo '## Nonce key.' >> /etc/turnserver/turnserver.conf
|
||||||
echo "nonce_key = \"$VOIP_TURN_NONCE\"" >> /etc/turnserver/turnserver.conf
|
echo "nonce_key = \"$TURN_NONCE\"" >> /etc/turnserver/turnserver.conf
|
||||||
echo '' >> /etc/turnserver/turnserver.conf
|
echo '' >> /etc/turnserver/turnserver.conf
|
||||||
echo '## Max relay per username.' >> /etc/turnserver/turnserver.conf
|
echo '## Max relay per username.' >> /etc/turnserver/turnserver.conf
|
||||||
echo 'max_relay_per_username = 5' >> /etc/turnserver/turnserver.conf
|
echo 'max_relay_per_username = 5' >> /etc/turnserver/turnserver.conf
|
||||||
|
@ -440,8 +440,8 @@ function install_sip_turn {
|
||||||
|
|
||||||
systemctl restart turnserver
|
systemctl restart turnserver
|
||||||
|
|
||||||
function_check configure_firewall_for_voip_turn
|
function_check configure_firewall_for_turn
|
||||||
configure_firewall_for_voip_turn
|
configure_firewall_for_turn
|
||||||
install_completed sip_turn
|
install_completed sip_turn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1928,7 +1928,7 @@ function interactive_config {
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle $"Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title $"Your main domain name" \
|
--title $"Your main domain name" \
|
||||||
--form $"\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
|
--form $"\nWhich domain name should your email/XMPP/IRC/Mumble be associated with?" 11 55 3 \
|
||||||
$"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \
|
$"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \
|
||||||
$"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \
|
$"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \
|
||||||
2> $data
|
2> $data
|
||||||
|
@ -1947,7 +1947,7 @@ function interactive_config {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dialog --backtitle $"Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--inputbox $"Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
|
--inputbox $"Which domain name should your email/XMPP/IRC/Mumble be associated with?" 10 45 \
|
||||||
"$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
"$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
|
|
@ -55,9 +55,9 @@ UPDATE_DATE_SCRIPT=/usr/bin/updatedate
|
||||||
# Minimum number of characters in a password
|
# Minimum number of characters in a password
|
||||||
MINIMUM_PASSWORD_LENGTH=$(cat /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
|
MINIMUM_PASSWORD_LENGTH=$(cat /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
|
||||||
|
|
||||||
# voip
|
# Mumble
|
||||||
VOIP_PORT=64738
|
MUMBLE_PORT=64738
|
||||||
VOIP_ONION_PORT=8095
|
MUMBLE_ONION_PORT=8095
|
||||||
|
|
||||||
SSH_PORT=2222
|
SSH_PORT=2222
|
||||||
|
|
||||||
|
@ -344,12 +344,6 @@ function show_domains {
|
||||||
app_name_first_upper="$(tr '[:lower:]' '[:upper:]' <<< ${app_name:0:1})${app_name:1}"
|
app_name_first_upper="$(tr '[:lower:]' '[:upper:]' <<< ${app_name:0:1})${app_name:1}"
|
||||||
if grep -q "${app_name_first_upper} domain" $COMPLETION_FILE; then
|
if grep -q "${app_name_first_upper} domain" $COMPLETION_FILE; then
|
||||||
app_name=${app_name_first_upper}
|
app_name=${app_name_first_upper}
|
||||||
else
|
|
||||||
if [[ ${app_name} == "mumble" ]]; then
|
|
||||||
app_name="VoIP"
|
|
||||||
else
|
|
||||||
if [[ ${app_name} == "gnusocial" ]]; then
|
|
||||||
app_name="GNU Social"
|
|
||||||
else
|
else
|
||||||
if [[ ${app_name} == "searx" ]]; then
|
if [[ ${app_name} == "searx" ]]; then
|
||||||
app_name="Search engine"
|
app_name="Search engine"
|
||||||
|
@ -359,8 +353,6 @@ function show_domains {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${#app_name} -gt 0 ]; then
|
if [ ${#app_name} -gt 0 ]; then
|
||||||
if grep -q "${app_name} domain" $COMPLETION_FILE; then
|
if grep -q "${app_name} domain" $COMPLETION_FILE; then
|
||||||
|
@ -1089,7 +1081,7 @@ function restore_from_remote {
|
||||||
26 $"CJDNS" off \
|
26 $"CJDNS" off \
|
||||||
27 $"Email" off \
|
27 $"Email" off \
|
||||||
28 $"DLNA" off \
|
28 $"DLNA" off \
|
||||||
29 $"VoIP" off \
|
29 $"Mumble" off \
|
||||||
30 $"RSS reader" off \
|
30 $"RSS reader" off \
|
||||||
31 $"Tox" off 2> $data
|
31 $"Tox" off 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1131,7 +1123,7 @@ function restore_from_remote {
|
||||||
26) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
|
26) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
|
||||||
27) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
|
27) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
|
||||||
28) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
|
28) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
|
||||||
29) ${PROJECT_NAME}-restore-remote $remote_domain_name voip;;
|
29) ${PROJECT_NAME}-restore-remote $remote_domain_name mumble;;
|
||||||
30) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
|
30) ${PROJECT_NAME}-restore-remote $remote_domain_name ttrss;;
|
||||||
31) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
|
31) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -817,7 +817,7 @@ if [ \$no_of_users -gt 0 ]; then
|
||||||
echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/tox.desktop
|
echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo 'Name=Chat' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo 'Name=Chat' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo 'Comment=Chat, VoIP and Video' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo 'Comment=Chat, Voice and Video' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo 'Exec=bash /home/$MY_USERNAME/runtox' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo 'Exec=bash /home/$MY_USERNAME/runtox' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo "Icon=/usr/share/$PROJECT_NAME/avatars/chat.png" >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo "Icon=/usr/share/$PROJECT_NAME/avatars/chat.png" >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/tox.desktop
|
||||||
|
|
|
@ -343,7 +343,7 @@ fi
|
||||||
|
|
||||||
echo ''
|
echo ''
|
||||||
echo $'Choose communication service:'
|
echo $'Choose communication service:'
|
||||||
echo $' 1. VoIP'
|
echo $' 1. Voice'
|
||||||
echo $' 2. Tox Chat'
|
echo $' 2. Tox Chat'
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,14 @@ function read_configuration {
|
||||||
if grep -q "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE; then
|
if grep -q "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE; then
|
||||||
SYNCTHING_SHARED_DATA=$(grep "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
SYNCTHING_SHARED_DATA=$(grep "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "VOIP_TURN_PORT" $CONFIGURATION_FILE; then
|
if grep -q "TURN_PORT" $CONFIGURATION_FILE; then
|
||||||
VOIP_TURN_PORT=$(grep "VOIP_TURN_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
TURN_PORT=$(grep "TURN_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "VOIP_TURN_TLS_PORT" $CONFIGURATION_FILE; then
|
if grep -q "TURN_TLS_PORT" $CONFIGURATION_FILE; then
|
||||||
VOIP_TURN_TLS_PORT=$(grep "VOIP_TURN_TLS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
TURN_TLS_PORT=$(grep "TURN_TLS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "VOIP_TURN_NONCE" $CONFIGURATION_FILE; then
|
if grep -q "TURN_NONCE" $CONFIGURATION_FILE; then
|
||||||
VOIP_TURN_NONCE=$(grep "VOIP_TURN_NONCE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
TURN_NONCE=$(grep "TURN_NONCE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "DEFAULT_SEARCH" $CONFIGURATION_FILE; then
|
if grep -q "DEFAULT_SEARCH" $CONFIGURATION_FILE; then
|
||||||
DEFAULT_SEARCH=$(grep "DEFAULT_SEARCH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
DEFAULT_SEARCH=$(grep "DEFAULT_SEARCH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
@ -340,11 +340,11 @@ function read_configuration {
|
||||||
DEBIAN_REPO=$(grep "DEBIAN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
DEBIAN_REPO=$(grep "DEBIAN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
CHECK_MESSAGE=$"Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
|
CHECK_MESSAGE=$"Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
|
||||||
fi
|
fi
|
||||||
if grep -q "VOIP_PORT" $CONFIGURATION_FILE; then
|
if grep -q "MUMBLE_PORT" $CONFIGURATION_FILE; then
|
||||||
VOIP_PORT=$(grep "VOIP_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
MUMBLE_PORT=$(grep "MUMBLE_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "VOIP_SERVER_PASSWORD" $CONFIGURATION_FILE; then
|
if grep -q "MUMBLE_SERVER_PASSWORD" $CONFIGURATION_FILE; then
|
||||||
VOIP_SERVER_PASSWORD=$(grep "VOIP_SERVER_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
MUMBLE_SERVER_PASSWORD=$(grep "MUMBLE_SERVER_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
if grep -q "SIP_PORT" $CONFIGURATION_FILE; then
|
if grep -q "SIP_PORT" $CONFIGURATION_FILE; then
|
||||||
SIP_PORT=$(grep "SIP_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
SIP_PORT=$(grep "SIP_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
|
|
@ -60,8 +60,8 @@ function show_help {
|
||||||
echo $' --email Your email address'
|
echo $' --email Your email address'
|
||||||
echo $' --usb Path for the USB drive (eg. /dev/sdb1)'
|
echo $' --usb Path for the USB drive (eg. /dev/sdb1)'
|
||||||
echo $' --cjdns Enable CJDNS'
|
echo $' --cjdns Enable CJDNS'
|
||||||
echo $' --vpass VoIP server password'
|
echo $' --vpass Mumble server password'
|
||||||
echo $' --vport VoIP server port'
|
echo $' --vport Mumble server port'
|
||||||
echo $' --ns1 First DNS nameserver'
|
echo $' --ns1 First DNS nameserver'
|
||||||
echo $' --ns2 Second DNS nameserver'
|
echo $' --ns2 Second DNS nameserver'
|
||||||
echo $' --repo Debian repository'
|
echo $' --repo Debian repository'
|
||||||
|
|
|
@ -61,6 +61,7 @@ function upgrade_installation_from_previous_versions {
|
||||||
sed -i 's|install_gnu_social_theme|install_gnusocial_theme|g' $COMPLETION_FILE
|
sed -i 's|install_gnu_social_theme|install_gnusocial_theme|g' $COMPLETION_FILE
|
||||||
sed -i 's|install_gnu_social|install_gnusocial|g' $COMPLETION_FILE
|
sed -i 's|install_gnu_social|install_gnusocial|g' $COMPLETION_FILE
|
||||||
sed -i 's|install_irc_server|install_irc|g' $COMPLETION_FILE
|
sed -i 's|install_irc_server|install_irc|g' $COMPLETION_FILE
|
||||||
|
sed -i 's|voip_turn|turn|g' $COMPLETION_FILE
|
||||||
sed -i 's|install_voip|install_mumble|g' $COMPLETION_FILE
|
sed -i 's|install_voip|install_mumble|g' $COMPLETION_FILE
|
||||||
sed -i 's|install_rss_reader|install_rss|g' $COMPLETION_FILE
|
sed -i 's|install_rss_reader|install_rss|g' $COMPLETION_FILE
|
||||||
sed -i 's|install_tox_node|install_tox|g' $COMPLETION_FILE
|
sed -i 's|install_tox_node|install_tox|g' $COMPLETION_FILE
|
||||||
|
@ -68,6 +69,8 @@ function upgrade_installation_from_previous_versions {
|
||||||
|
|
||||||
sed -i 's|GNU Social|gnusocial|g' $COMPLETION_FILE
|
sed -i 's|GNU Social|gnusocial|g' $COMPLETION_FILE
|
||||||
sed -i 's|XMPP|xmpp|g' $COMPLETION_FILE
|
sed -i 's|XMPP|xmpp|g' $COMPLETION_FILE
|
||||||
|
sed -i 's|voip|mumble|g' $COMPLETION_FILE
|
||||||
|
sed -i 's|VoIP|mumble|g' $COMPLETION_FILE
|
||||||
|
|
||||||
if [ -f /usr/local/bin/zeronetavahi ]; then
|
if [ -f /usr/local/bin/zeronetavahi ]; then
|
||||||
rm /usr/local/bin/zeronetavahi
|
rm /usr/local/bin/zeronetavahi
|
||||||
|
|
Loading…
Reference in New Issue