| 
				
			 | 
			
			
				@@ -37,10 +37,10 @@ CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg 
			 | 
		
	
		
			
			| 
				37
			 | 
			
				37
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				38
			 | 
			
				38
			 | 
			
			
				 MUMBLE_PATH=/usr/bin/mumble 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				39
			 | 
			
			
				 if [ -f /usr/local/bin/${PROJECT_NAME} ]; then 
			 | 
		
	
		
			
			| 
				40
			 | 
			
				
			 | 
			
			
				-    TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				40
			 | 
			
			
				+	TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				41
			 | 
			
				41
			 | 
			
			
				 else 
			 | 
		
	
		
			
			| 
				42
			 | 
			
				
			 | 
			
			
				-    TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')        
			 | 
		
	
		
			
			| 
				43
			 | 
			
				
			 | 
			
			
				-fi  
			 | 
		
	
		
			
			| 
				
			 | 
			
				42
			 | 
			
			
				+	TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				43
			 | 
			
			
				+fi 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				44
			 | 
			
			
				 DHTNODES=/usr/share/toxic/DHTnodes 
			 | 
		
	
		
			
			| 
				45
			 | 
			
				45
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				46
			 | 
			
				46
			 | 
			
			
				 PEERS_FILE=/tmp/meshpeers.txt 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -69,225 +69,226 @@ QTOX_INI="/home/$USER/.config/tox/qtox.ini" 
			 | 
		
	
		
			
			| 
				69
			 | 
			
				69
			 | 
			
			
				 SERVER_INSTALLATION="no" 
			 | 
		
	
		
			
			| 
				70
			 | 
			
				70
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				71
			 | 
			
				71
			 | 
			
			
				 function install_toxcore { 
			 | 
		
	
		
			
			| 
				72
			 | 
			
				
			 | 
			
			
				-    if [ -f /etc/tox-bootstrapd.conf ]; then 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				75
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				
			 | 
			
			
				-    sudo apt-get -y install build-essential libtool autotools-dev 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				
			 | 
			
			
				-    sudo apt-get -y install automake checkinstall check git yasm 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				
			 | 
			
			
				-    sudo apt-get -y install libsodium13 libsodium-dev libcap2-bin 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				
			 | 
			
			
				-    sudo apt-get -y install libconfig9 libconfig-dev 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				81
			 | 
			
				
			 | 
			
			
				-    if [ ! -d ~/develop ]; then 
			 | 
		
	
		
			
			| 
				82
			 | 
			
				
			 | 
			
			
				-        mkdir ~/develop 
			 | 
		
	
		
			
			| 
				83
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				84
			 | 
			
				
			 | 
			
			
				-    cd ~/develop 
			 | 
		
	
		
			
			| 
				85
			 | 
			
				
			 | 
			
			
				-    git clone $TOXCORE_REPO ~/develop/toxcore 
			 | 
		
	
		
			
			| 
				86
			 | 
			
				
			 | 
			
			
				-    cd ~/develop/toxcore 
			 | 
		
	
		
			
			| 
				87
			 | 
			
				
			 | 
			
			
				-    autoreconf -i 
			 | 
		
	
		
			
			| 
				88
			 | 
			
				
			 | 
			
			
				-    ./configure --enable-daemon 
			 | 
		
	
		
			
			| 
				89
			 | 
			
				
			 | 
			
			
				-    if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				90
			 | 
			
				
			 | 
			
			
				-        exit 78467 
			 | 
		
	
		
			
			| 
				91
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				92
			 | 
			
				
			 | 
			
			
				-    make 
			 | 
		
	
		
			
			| 
				93
			 | 
			
				
			 | 
			
			
				-    if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				94
			 | 
			
				
			 | 
			
			
				-        exit 84562 
			 | 
		
	
		
			
			| 
				95
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				96
			 | 
			
				
			 | 
			
			
				-    sudo make install 
			 | 
		
	
		
			
			| 
				97
			 | 
			
				
			 | 
			
			
				-    sudo cp /usr/local/lib/libtoxcore* /usr/lib/ 
			 | 
		
	
		
			
			| 
				98
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				99
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /usr/local/bin/tox-bootstrapd ]; then 
			 | 
		
	
		
			
			| 
				100
			 | 
			
				
			 | 
			
			
				-        echo $"File not found /usr/local/bin/tox-bootstrapd" 
			 | 
		
	
		
			
			| 
				101
			 | 
			
				
			 | 
			
			
				-        exit 73862 
			 | 
		
	
		
			
			| 
				102
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				103
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				104
			 | 
			
				
			 | 
			
			
				-    sudo useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd 
			 | 
		
	
		
			
			| 
				105
			 | 
			
				
			 | 
			
			
				-    sudo chmod 700 /var/lib/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				106
			 | 
			
				
			 | 
			
			
				-    if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf ]; then 
			 | 
		
	
		
			
			| 
				107
			 | 
			
				
			 | 
			
			
				-        echo $"File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf" 
			 | 
		
	
		
			
			| 
				108
			 | 
			
				
			 | 
			
			
				-        exit 476835 
			 | 
		
	
		
			
			| 
				109
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				110
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				111
			 | 
			
				
			 | 
			
			
				-    # create configuration file 
			 | 
		
	
		
			
			| 
				112
			 | 
			
				
			 | 
			
			
				-    echo "port = $TOX_PORT" > /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				113
			 | 
			
				
			 | 
			
			
				-    echo 'keys_file_path = "/var/lib/tox-bootstrapd/keys"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				114
			 | 
			
				
			 | 
			
			
				-    echo 'pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				115
			 | 
			
				
			 | 
			
			
				-    echo 'enable_ipv6 = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				116
			 | 
			
				
			 | 
			
			
				-    echo 'enable_ipv4_fallback = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				117
			 | 
			
				
			 | 
			
			
				-    echo 'enable_lan_discovery = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				118
			 | 
			
				
			 | 
			
			
				-    echo 'enable_tcp_relay = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				119
			 | 
			
				
			 | 
			
			
				-    echo "tcp_relay_ports = [443, 3389, $TOX_PORT]" >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				120
			 | 
			
				
			 | 
			
			
				-    echo 'enable_motd = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				121
			 | 
			
				
			 | 
			
			
				-    echo 'motd = "tox-bootstrapd"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				122
			 | 
			
				
			 | 
			
			
				-    sudo cp /tmp/tox-bootstrapd.conf /etc/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				123
			 | 
			
				
			 | 
			
			
				-    rm /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				124
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				125
			 | 
			
				
			 | 
			
			
				-    if [ -f /bin/systemctl ]; then 
			 | 
		
	
		
			
			| 
				126
			 | 
			
				
			 | 
			
			
				-        if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then 
			 | 
		
	
		
			
			| 
				127
			 | 
			
				
			 | 
			
			
				-            echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" 
			 | 
		
	
		
			
			| 
				128
			 | 
			
				
			 | 
			
			
				-            exit 7359 
			 | 
		
	
		
			
			| 
				129
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				130
			 | 
			
				
			 | 
			
			
				-        sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/ 
			 | 
		
	
		
			
			| 
				131
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				132
			 | 
			
				
			 | 
			
			
				-        sudo systemctl daemon-reload 
			 | 
		
	
		
			
			| 
				133
			 | 
			
				
			 | 
			
			
				-        sudo systemctl enable tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				134
			 | 
			
				
			 | 
			
			
				-        sudo systemctl start tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				135
			 | 
			
				
			 | 
			
			
				-        if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				136
			 | 
			
				
			 | 
			
			
				-            sudo systemctl status tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				137
			 | 
			
				
			 | 
			
			
				-            exit 5846 
			 | 
		
	
		
			
			| 
				138
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				139
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				140
			 | 
			
				
			 | 
			
			
				-        sudo systemctl restart tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				141
			 | 
			
				
			 | 
			
			
				-    else 
			 | 
		
	
		
			
			| 
				142
			 | 
			
				
			 | 
			
			
				-        sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.sh /etc/init.d/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				143
			 | 
			
				
			 | 
			
			
				-        sudo chmod 755 /etc/init.d/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				144
			 | 
			
				
			 | 
			
			
				-        sudo update-rc.d tox-bootstrapd defaults 
			 | 
		
	
		
			
			| 
				145
			 | 
			
				
			 | 
			
			
				-        sudo service tox-bootstrapd start 
			 | 
		
	
		
			
			| 
				146
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				147
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				148
			 | 
			
				
			 | 
			
			
				-    TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1) 
			 | 
		
	
		
			
			| 
				149
			 | 
			
				
			 | 
			
			
				-    if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then 
			 | 
		
	
		
			
			| 
				150
			 | 
			
				
			 | 
			
			
				-        echo $'Could not obtain the tox node public key' 
			 | 
		
	
		
			
			| 
				151
			 | 
			
				
			 | 
			
			
				-        exit 6529 
			 | 
		
	
		
			
			| 
				152
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				153
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				154
			 | 
			
				
			 | 
			
			
				-    # save the public key for later reference 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				
			 | 
			
			
				-    echo "$TOX_PUBLIC_KEY" > /tmp/boostrapid 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				
			 | 
			
			
				-    sudo mv /tmp/boostrapid $TOX_BOOTSTRAP_ID_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				72
			 | 
			
			
				+	if [ -f /etc/tox-bootstrapd.conf ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				73
			 | 
			
			
				+		return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				74
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				75
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				76
			 | 
			
			
				+	sudo apt-get -y install build-essential libtool autotools-dev 
			 | 
		
	
		
			
			| 
				
			 | 
			
				77
			 | 
			
			
				+	sudo apt-get -y install automake checkinstall check git yasm 
			 | 
		
	
		
			
			| 
				
			 | 
			
				78
			 | 
			
			
				+	sudo apt-get -y install libsodium13 libsodium-dev libcap2-bin 
			 | 
		
	
		
			
			| 
				
			 | 
			
				79
			 | 
			
			
				+	sudo apt-get -y install libconfig9 libconfig-dev 
			 | 
		
	
		
			
			| 
				
			 | 
			
				80
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				81
			 | 
			
			
				+	if [ ! -d ~/develop ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				82
			 | 
			
			
				+		mkdir ~/develop 
			 | 
		
	
		
			
			| 
				
			 | 
			
				83
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				84
			 | 
			
			
				+	cd ~/develop 
			 | 
		
	
		
			
			| 
				
			 | 
			
				85
			 | 
			
			
				+	git clone $TOXCORE_REPO ~/develop/toxcore 
			 | 
		
	
		
			
			| 
				
			 | 
			
				86
			 | 
			
			
				+	cd ~/develop/toxcore 
			 | 
		
	
		
			
			| 
				
			 | 
			
				87
			 | 
			
			
				+	git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				88
			 | 
			
			
				+	autoreconf -i 
			 | 
		
	
		
			
			| 
				
			 | 
			
				89
			 | 
			
			
				+	./configure --enable-daemon 
			 | 
		
	
		
			
			| 
				
			 | 
			
				90
			 | 
			
			
				+	if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				91
			 | 
			
			
				+		exit 78467 
			 | 
		
	
		
			
			| 
				
			 | 
			
				92
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				93
			 | 
			
			
				+	make 
			 | 
		
	
		
			
			| 
				
			 | 
			
				94
			 | 
			
			
				+	if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				95
			 | 
			
			
				+		exit 84562 
			 | 
		
	
		
			
			| 
				
			 | 
			
				96
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				97
			 | 
			
			
				+	sudo make install 
			 | 
		
	
		
			
			| 
				
			 | 
			
				98
			 | 
			
			
				+	sudo cp /usr/local/lib/libtoxcore* /usr/lib/ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				99
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				100
			 | 
			
			
				+	if [ ! -f /usr/local/bin/tox-bootstrapd ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				101
			 | 
			
			
				+		echo $"File not found /usr/local/bin/tox-bootstrapd" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				102
			 | 
			
			
				+		exit 73862 
			 | 
		
	
		
			
			| 
				
			 | 
			
				103
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				104
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				105
			 | 
			
			
				+	sudo useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd 
			 | 
		
	
		
			
			| 
				
			 | 
			
				106
			 | 
			
			
				+	sudo chmod 700 /var/lib/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				
			 | 
			
				107
			 | 
			
			
				+	if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				108
			 | 
			
			
				+		echo $"File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				109
			 | 
			
			
				+		exit 476835 
			 | 
		
	
		
			
			| 
				
			 | 
			
				110
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				111
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				112
			 | 
			
			
				+	# create configuration file 
			 | 
		
	
		
			
			| 
				
			 | 
			
				113
			 | 
			
			
				+	echo "port = $TOX_PORT" > /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				114
			 | 
			
			
				+	echo 'keys_file_path = "/var/lib/tox-bootstrapd/keys"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				115
			 | 
			
			
				+	echo 'pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				116
			 | 
			
			
				+	echo 'enable_ipv6 = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				117
			 | 
			
			
				+	echo 'enable_ipv4_fallback = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				118
			 | 
			
			
				+	echo 'enable_lan_discovery = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				119
			 | 
			
			
				+	echo 'enable_tcp_relay = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				120
			 | 
			
			
				+	echo "tcp_relay_ports = [443, 3389, $TOX_PORT]" >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				121
			 | 
			
			
				+	echo 'enable_motd = true' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				122
			 | 
			
			
				+	echo 'motd = "tox-bootstrapd"' >> /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				123
			 | 
			
			
				+	sudo cp /tmp/tox-bootstrapd.conf /etc/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				124
			 | 
			
			
				+	rm /tmp/tox-bootstrapd.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				125
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				126
			 | 
			
			
				+	if [ -f /bin/systemctl ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				127
			 | 
			
			
				+		if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				128
			 | 
			
			
				+			echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				129
			 | 
			
			
				+			exit 7359 
			 | 
		
	
		
			
			| 
				
			 | 
			
				130
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				131
			 | 
			
			
				+		sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				132
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				133
			 | 
			
			
				+		sudo systemctl daemon-reload 
			 | 
		
	
		
			
			| 
				
			 | 
			
				134
			 | 
			
			
				+		sudo systemctl enable tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				135
			 | 
			
			
				+		sudo systemctl start tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				136
			 | 
			
			
				+		if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				137
			 | 
			
			
				+			sudo systemctl status tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				138
			 | 
			
			
				+			exit 5846 
			 | 
		
	
		
			
			| 
				
			 | 
			
				139
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				140
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				141
			 | 
			
			
				+		sudo systemctl restart tox-bootstrapd.service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				142
			 | 
			
			
				+	else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				143
			 | 
			
			
				+		sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.sh /etc/init.d/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				
			 | 
			
				144
			 | 
			
			
				+		sudo chmod 755 /etc/init.d/tox-bootstrapd 
			 | 
		
	
		
			
			| 
				
			 | 
			
				145
			 | 
			
			
				+		sudo update-rc.d tox-bootstrapd defaults 
			 | 
		
	
		
			
			| 
				
			 | 
			
				146
			 | 
			
			
				+		sudo service tox-bootstrapd start 
			 | 
		
	
		
			
			| 
				
			 | 
			
				147
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				148
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				149
			 | 
			
			
				+	TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				150
			 | 
			
			
				+	if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				151
			 | 
			
			
				+		echo $'Could not obtain the tox node public key' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				152
			 | 
			
			
				+		exit 6529 
			 | 
		
	
		
			
			| 
				
			 | 
			
				153
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				154
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				155
			 | 
			
			
				+	# save the public key for later reference 
			 | 
		
	
		
			
			| 
				
			 | 
			
				156
			 | 
			
			
				+	echo "$TOX_PUBLIC_KEY" > /tmp/boostrapid 
			 | 
		
	
		
			
			| 
				
			 | 
			
				157
			 | 
			
			
				+	sudo mv /tmp/boostrapid $TOX_BOOTSTRAP_ID_FILE 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				158
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				158
			 | 
			
				159
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				159
			 | 
			
				160
			 | 
			
			
				 function install_toxid { 
			 | 
		
	
		
			
			| 
				160
			 | 
			
				
			 | 
			
			
				-    if [ -f /usr/local/bin/toxid ]; then 
			 | 
		
	
		
			
			| 
				161
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				162
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				163
			 | 
			
				
			 | 
			
			
				-    cd ~/develop 
			 | 
		
	
		
			
			| 
				164
			 | 
			
				
			 | 
			
			
				-    git clone $TOXID_REPO ~/develop/toxid 
			 | 
		
	
		
			
			| 
				165
			 | 
			
				
			 | 
			
			
				-    cd ~/develop/toxid 
			 | 
		
	
		
			
			| 
				166
			 | 
			
				
			 | 
			
			
				-    make 
			 | 
		
	
		
			
			| 
				167
			 | 
			
				
			 | 
			
			
				-    sudo make install 
			 | 
		
	
		
			
			| 
				168
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				169
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /usr/local/bin/toxid ]; then 
			 | 
		
	
		
			
			| 
				170
			 | 
			
				
			 | 
			
			
				-        echo $"Couldn't install toxid" 
			 | 
		
	
		
			
			| 
				171
			 | 
			
				
			 | 
			
			
				-        exit 6389 
			 | 
		
	
		
			
			| 
				172
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				173
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				174
			 | 
			
				
			 | 
			
			
				-    if ! grep -Fxq "toxavahi" /etc/crontab; then 
			 | 
		
	
		
			
			| 
				175
			 | 
			
				
			 | 
			
			
				-        cp /etc/crontab /tmp/crontab 
			 | 
		
	
		
			
			| 
				176
			 | 
			
				
			 | 
			
			
				-        echo "* *       * * *   root    toxavahi > /dev/null" >> /tmp/crontab 
			 | 
		
	
		
			
			| 
				177
			 | 
			
				
			 | 
			
			
				-        sudo cp /tmp/crontab /etc/crontab 
			 | 
		
	
		
			
			| 
				178
			 | 
			
				
			 | 
			
			
				-        rm /tmp/crontab 
			 | 
		
	
		
			
			| 
				179
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				161
			 | 
			
			
				+	if [ -f /usr/local/bin/toxid ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				162
			 | 
			
			
				+		return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				163
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				164
			 | 
			
			
				+	cd ~/develop 
			 | 
		
	
		
			
			| 
				
			 | 
			
				165
			 | 
			
			
				+	git clone $TOXID_REPO ~/develop/toxid 
			 | 
		
	
		
			
			| 
				
			 | 
			
				166
			 | 
			
			
				+	cd ~/develop/toxid 
			 | 
		
	
		
			
			| 
				
			 | 
			
				167
			 | 
			
			
				+	make 
			 | 
		
	
		
			
			| 
				
			 | 
			
				168
			 | 
			
			
				+	sudo make install 
			 | 
		
	
		
			
			| 
				
			 | 
			
				169
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				170
			 | 
			
			
				+	if [ ! -f /usr/local/bin/toxid ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				171
			 | 
			
			
				+		echo $"Couldn't install toxid" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				172
			 | 
			
			
				+		exit 6389 
			 | 
		
	
		
			
			| 
				
			 | 
			
				173
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				174
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				175
			 | 
			
			
				+	if ! grep -Fxq "toxavahi" /etc/crontab; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				176
			 | 
			
			
				+		cp /etc/crontab /tmp/crontab 
			 | 
		
	
		
			
			| 
				
			 | 
			
				177
			 | 
			
			
				+		echo "* *       * * *   root    toxavahi > /dev/null" >> /tmp/crontab 
			 | 
		
	
		
			
			| 
				
			 | 
			
				178
			 | 
			
			
				+		sudo cp /tmp/crontab /etc/crontab 
			 | 
		
	
		
			
			| 
				
			 | 
			
				179
			 | 
			
			
				+		rm /tmp/crontab 
			 | 
		
	
		
			
			| 
				
			 | 
			
				180
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				180
			 | 
			
				181
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				181
			 | 
			
				182
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				182
			 | 
			
				183
			 | 
			
			
				 function run_tox { 
			 | 
		
	
		
			
			| 
				183
			 | 
			
				
			 | 
			
			
				-    echo $QTOX_INI 
			 | 
		
	
		
			
			| 
				184
			 | 
			
				
			 | 
			
			
				-    if [[ -f $TOXIC_FILE || -f $QTOX_INI ]]; then 
			 | 
		
	
		
			
			| 
				185
			 | 
			
				
			 | 
			
			
				-        if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				186
			 | 
			
				
			 | 
			
			
				-            # update bootstrap nodes 
			 | 
		
	
		
			
			| 
				187
			 | 
			
				
			 | 
			
			
				-            if [ -f $DHTNODES ]; then 
			 | 
		
	
		
			
			| 
				188
			 | 
			
				
			 | 
			
			
				-                if [ ! -f $DHTNODES.internet ]; then 
			 | 
		
	
		
			
			| 
				189
			 | 
			
				
			 | 
			
			
				-                    sudo cp $DHTNODES $DHTNODES.internet 
			 | 
		
	
		
			
			| 
				190
			 | 
			
				
			 | 
			
			
				-                fi 
			 | 
		
	
		
			
			| 
				191
			 | 
			
				
			 | 
			
			
				-            fi 
			 | 
		
	
		
			
			| 
				192
			 | 
			
				
			 | 
			
			
				-            lstox -f dht > /tmp/dht 
			 | 
		
	
		
			
			| 
				193
			 | 
			
				
			 | 
			
			
				-            sudo cp /tmp/dht $DHTNODES 
			 | 
		
	
		
			
			| 
				194
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				195
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				196
			 | 
			
				
			 | 
			
			
				-        # get a list of peers 
			 | 
		
	
		
			
			| 
				197
			 | 
			
				
			 | 
			
			
				-        PEER_TOX_ID_LIST=$(lstox | grep $AVAHI_DOMAIN | sort -u) 
			 | 
		
	
		
			
			| 
				198
			 | 
			
				
			 | 
			
			
				-        if [ ! "$PEER_TOX_ID_LIST" ]; then 
			 | 
		
	
		
			
			| 
				199
			 | 
			
				
			 | 
			
			
				-            echo $'No peers found' 
			 | 
		
	
		
			
			| 
				200
			 | 
			
				
			 | 
			
			
				-            exit 0 
			 | 
		
	
		
			
			| 
				201
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				202
			 | 
			
				
			 | 
			
			
				-        PEER_TOX_ID_LIST_COUNT=$(echo "$PEER_TOX_ID_LIST" | wc -l) 
			 | 
		
	
		
			
			| 
				203
			 | 
			
				
			 | 
			
			
				-        PEER_TOX_ID='' 
			 | 
		
	
		
			
			| 
				204
			 | 
			
				
			 | 
			
			
				-        if [ $PEER_TOX_ID_LIST_COUNT -lt "2" ]; then 
			 | 
		
	
		
			
			| 
				205
			 | 
			
				
			 | 
			
			
				-            # single peer 
			 | 
		
	
		
			
			| 
				206
			 | 
			
				
			 | 
			
			
				-            PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | awk -F ' ' '{print $3}') 
			 | 
		
	
		
			
			| 
				207
			 | 
			
				
			 | 
			
			
				-        else 
			 | 
		
	
		
			
			| 
				208
			 | 
			
				
			 | 
			
			
				-            # choose a user from a list 
			 | 
		
	
		
			
			| 
				209
			 | 
			
				
			 | 
			
			
				-            echo '' 
			 | 
		
	
		
			
			| 
				210
			 | 
			
				
			 | 
			
			
				-            echo $"Select a user on $AVAHI_DOMAIN:" 
			 | 
		
	
		
			
			| 
				211
			 | 
			
				
			 | 
			
			
				-            ctr=0 
			 | 
		
	
		
			
			| 
				212
			 | 
			
				
			 | 
			
			
				-            while IFS='' read -r line || [[ -n "$line" ]]; do 
			 | 
		
	
		
			
			| 
				213
			 | 
			
				
			 | 
			
			
				-                toxusername=$(echo $line | awk -F ' ' '{print $2}') 
			 | 
		
	
		
			
			| 
				214
			 | 
			
				
			 | 
			
			
				-                echo "    $ctr. $toxusername" 
			 | 
		
	
		
			
			| 
				215
			 | 
			
				
			 | 
			
			
				-                ctr=$((ctr + 1)) 
			 | 
		
	
		
			
			| 
				216
			 | 
			
				
			 | 
			
			
				-            done < "$PEER_TOX_ID_LIST" 
			 | 
		
	
		
			
			| 
				217
			 | 
			
				
			 | 
			
			
				-            read user_index 
			 | 
		
	
		
			
			| 
				218
			 | 
			
				
			 | 
			
			
				-            PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | tail -n+${user_index} | head -n1 | awk -F ' ' '{print $3}') 
			 | 
		
	
		
			
			| 
				219
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				220
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				221
			 | 
			
				
			 | 
			
			
				-        # if this is a valid ID 
			 | 
		
	
		
			
			| 
				222
			 | 
			
				
			 | 
			
			
				-        if [ ${#PEER_TOX_ID} -gt 30 ]; then 
			 | 
		
	
		
			
			| 
				223
			 | 
			
				
			 | 
			
			
				-            # start client and make a friend request 
			 | 
		
	
		
			
			| 
				224
			 | 
			
				
			 | 
			
			
				-            if [ -f $QTOX_INI ]; then 
			 | 
		
	
		
			
			| 
				225
			 | 
			
				
			 | 
			
			
				-                echo $'Launch qTox' 
			 | 
		
	
		
			
			| 
				226
			 | 
			
				
			 | 
			
			
				-                qtox & 
			 | 
		
	
		
			
			| 
				227
			 | 
			
				
			 | 
			
			
				-            else 
			 | 
		
	
		
			
			| 
				228
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				229
			 | 
			
				
			 | 
			
			
				-                echo "n 
			 | 
		
	
		
			
			| 
				
			 | 
			
				184
			 | 
			
			
				+	echo $QTOX_INI 
			 | 
		
	
		
			
			| 
				
			 | 
			
				185
			 | 
			
			
				+	if [[ -f $TOXIC_FILE || -f $QTOX_INI ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				186
			 | 
			
			
				+		if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				187
			 | 
			
			
				+			# update bootstrap nodes 
			 | 
		
	
		
			
			| 
				
			 | 
			
				188
			 | 
			
			
				+			if [ -f $DHTNODES ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				189
			 | 
			
			
				+				if [ ! -f $DHTNODES.internet ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				190
			 | 
			
			
				+					sudo cp $DHTNODES $DHTNODES.internet 
			 | 
		
	
		
			
			| 
				
			 | 
			
				191
			 | 
			
			
				+				fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				192
			 | 
			
			
				+			fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				193
			 | 
			
			
				+			lstox -f dht > /tmp/dht 
			 | 
		
	
		
			
			| 
				
			 | 
			
				194
			 | 
			
			
				+			sudo cp /tmp/dht $DHTNODES 
			 | 
		
	
		
			
			| 
				
			 | 
			
				195
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				196
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				197
			 | 
			
			
				+		# get a list of peers 
			 | 
		
	
		
			
			| 
				
			 | 
			
				198
			 | 
			
			
				+		PEER_TOX_ID_LIST=$(lstox | grep $AVAHI_DOMAIN | sort -u) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				199
			 | 
			
			
				+		if [ ! "$PEER_TOX_ID_LIST" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				200
			 | 
			
			
				+			echo $'No peers found' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				201
			 | 
			
			
				+			exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				202
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				203
			 | 
			
			
				+		PEER_TOX_ID_LIST_COUNT=$(echo "$PEER_TOX_ID_LIST" | wc -l) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				204
			 | 
			
			
				+		PEER_TOX_ID='' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				205
			 | 
			
			
				+		if [ $PEER_TOX_ID_LIST_COUNT -lt "2" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				206
			 | 
			
			
				+			# single peer 
			 | 
		
	
		
			
			| 
				
			 | 
			
				207
			 | 
			
			
				+			PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | awk -F ' ' '{print $3}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				208
			 | 
			
			
				+		else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				209
			 | 
			
			
				+			# choose a user from a list 
			 | 
		
	
		
			
			| 
				
			 | 
			
				210
			 | 
			
			
				+			echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				211
			 | 
			
			
				+			echo $"Select a user on $AVAHI_DOMAIN:" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				212
			 | 
			
			
				+			ctr=0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				213
			 | 
			
			
				+			while IFS='' read -r line || [[ -n "$line" ]]; do 
			 | 
		
	
		
			
			| 
				
			 | 
			
				214
			 | 
			
			
				+				toxusername=$(echo $line | awk -F ' ' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				215
			 | 
			
			
				+				echo "    $ctr. $toxusername" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				216
			 | 
			
			
				+				ctr=$((ctr + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				217
			 | 
			
			
				+			done < "$PEER_TOX_ID_LIST" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				218
			 | 
			
			
				+			read user_index 
			 | 
		
	
		
			
			| 
				
			 | 
			
				219
			 | 
			
			
				+			PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | tail -n+${user_index} | head -n1 | awk -F ' ' '{print $3}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				220
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				221
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				222
			 | 
			
			
				+		# if this is a valid ID 
			 | 
		
	
		
			
			| 
				
			 | 
			
				223
			 | 
			
			
				+		if [ ${#PEER_TOX_ID} -gt 30 ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				224
			 | 
			
			
				+			# start client and make a friend request 
			 | 
		
	
		
			
			| 
				
			 | 
			
				225
			 | 
			
			
				+			if [ -f $QTOX_INI ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				226
			 | 
			
			
				+				echo $'Launch qTox' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				227
			 | 
			
			
				+				qtox & 
			 | 
		
	
		
			
			| 
				
			 | 
			
				228
			 | 
			
			
				+			else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				229
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				230
			 | 
			
			
				+				echo "n 
			 | 
		
	
		
			
			| 
				230
			 | 
			
				231
			 | 
			
			
				 /nick $USER 
			 | 
		
	
		
			
			| 
				231
			 | 
			
				232
			 | 
			
			
				 /add $PEER_TOX_ID 
			 | 
		
	
		
			
			| 
				232
			 | 
			
				233
			 | 
			
			
				 /exit 
			 | 
		
	
		
			
			| 
				233
			 | 
			
				234
			 | 
			
			
				 " | $TOXIC_FILE -d 
			 | 
		
	
		
			
			| 
				234
			 | 
			
				
			 | 
			
			
				-                # Running twice is a hack to get around buggyness in the client 
			 | 
		
	
		
			
			| 
				235
			 | 
			
				
			 | 
			
			
				-                $TOXIC_FILE -d 
			 | 
		
	
		
			
			| 
				236
			 | 
			
				
			 | 
			
			
				-            fi 
			 | 
		
	
		
			
			| 
				237
			 | 
			
				
			 | 
			
			
				-            exit 0 
			 | 
		
	
		
			
			| 
				238
			 | 
			
				
			 | 
			
			
				-        else 
			 | 
		
	
		
			
			| 
				239
			 | 
			
				
			 | 
			
			
				-            # ID was invalid 
			 | 
		
	
		
			
			| 
				240
			 | 
			
				
			 | 
			
			
				-            echo $PEER_TOX_ID 
			 | 
		
	
		
			
			| 
				241
			 | 
			
				
			 | 
			
			
				-            echo $"Tox ID for $AVAHI_DOMAIN was not found" 
			 | 
		
	
		
			
			| 
				242
			 | 
			
				
			 | 
			
			
				-            exit 6 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				235
			 | 
			
			
				+				# Running twice is a hack to get around buggyness in the client 
			 | 
		
	
		
			
			| 
				
			 | 
			
				236
			 | 
			
			
				+				$TOXIC_FILE -d 
			 | 
		
	
		
			
			| 
				
			 | 
			
				237
			 | 
			
			
				+			fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				238
			 | 
			
			
				+			exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				239
			 | 
			
			
				+		else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				240
			 | 
			
			
				+			# ID was invalid 
			 | 
		
	
		
			
			| 
				
			 | 
			
				241
			 | 
			
			
				+			echo $PEER_TOX_ID 
			 | 
		
	
		
			
			| 
				
			 | 
			
				242
			 | 
			
			
				+			echo $"Tox ID for $AVAHI_DOMAIN was not found" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				243
			 | 
			
			
				+			exit 6 
			 | 
		
	
		
			
			| 
				
			 | 
			
				244
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				245
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				246
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				246
			 | 
			
				247
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				247
			 | 
			
				248
			 | 
			
			
				 if [ -f /var/lib/batman ]; then 
			 | 
		
	
		
			
			| 
				248
			 | 
			
				
			 | 
			
			
				-    SERVER_INSTALLATION="yes" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				249
			 | 
			
			
				+	SERVER_INSTALLATION="yes" 
			 | 
		
	
		
			
			| 
				249
			 | 
			
				250
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				250
			 | 
			
				251
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				251
			 | 
			
				252
			 | 
			
			
				 if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				252
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /usr/bin/batman ]; then 
			 | 
		
	
		
			
			| 
				253
			 | 
			
				
			 | 
			
			
				-        ${PROJECT_NAME}-client 
			 | 
		
	
		
			
			| 
				254
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				253
			 | 
			
			
				+	if [ ! -f /usr/bin/batman ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				254
			 | 
			
			
				+		${PROJECT_NAME}-client 
			 | 
		
	
		
			
			| 
				
			 | 
			
				255
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				255
			 | 
			
				256
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				256
			 | 
			
				257
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				257
			 | 
			
				258
			 | 
			
			
				 # alternative toxic paths 
			 | 
		
	
		
			
			| 
				258
			 | 
			
				259
			 | 
			
			
				 if [ -f /usr/local/bin/toxic ]; then 
			 | 
		
	
		
			
			| 
				259
			 | 
			
				
			 | 
			
			
				-    TOXIC_FILE=/usr/local/bin/toxic 
			 | 
		
	
		
			
			| 
				
			 | 
			
				260
			 | 
			
			
				+	TOXIC_FILE=/usr/local/bin/toxic 
			 | 
		
	
		
			
			| 
				260
			 | 
			
				261
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				261
			 | 
			
				262
			 | 
			
			
				 if [ -f /usr/local/share/toxic/DHTnodes ]; then 
			 | 
		
	
		
			
			| 
				262
			 | 
			
				
			 | 
			
			
				-    DHTNODES=/usr/local/share/toxic/DHTnodes 
			 | 
		
	
		
			
			| 
				
			 | 
			
				263
			 | 
			
			
				+	DHTNODES=/usr/local/share/toxic/DHTnodes 
			 | 
		
	
		
			
			| 
				263
			 | 
			
				264
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				264
			 | 
			
				265
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				265
			 | 
			
				266
			 | 
			
			
				 if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				266
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /tmp/meshtype ]; then 
			 | 
		
	
		
			
			| 
				267
			 | 
			
				
			 | 
			
			
				-        install_toxcore 
			 | 
		
	
		
			
			| 
				268
			 | 
			
				
			 | 
			
			
				-        install_toxid 
			 | 
		
	
		
			
			| 
				269
			 | 
			
				
			 | 
			
			
				-        sudo batman start 
			 | 
		
	
		
			
			| 
				270
			 | 
			
				
			 | 
			
			
				-        if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				271
			 | 
			
				
			 | 
			
			
				-            exit 2 
			 | 
		
	
		
			
			| 
				272
			 | 
			
				
			 | 
			
			
				-        fi 
			 | 
		
	
		
			
			| 
				273
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				267
			 | 
			
			
				+	if [ ! -f /tmp/meshtype ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				268
			 | 
			
			
				+		install_toxcore 
			 | 
		
	
		
			
			| 
				
			 | 
			
				269
			 | 
			
			
				+		install_toxid 
			 | 
		
	
		
			
			| 
				
			 | 
			
				270
			 | 
			
			
				+		sudo batman start 
			 | 
		
	
		
			
			| 
				
			 | 
			
				271
			 | 
			
			
				+		if [ ! "$?" = "0" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				272
			 | 
			
			
				+			exit 2 
			 | 
		
	
		
			
			| 
				
			 | 
			
				273
			 | 
			
			
				+		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				274
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				274
			 | 
			
				275
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				275
			 | 
			
				276
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				276
			 | 
			
				277
			 | 
			
			
				 avahi-browse -atl | awk -F ' ' '{print $4}' | sort -u > $PEERS_FILE 
			 | 
		
	
		
			
			| 
				277
			 | 
			
				278
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				278
			 | 
			
				279
			 | 
			
			
				 if [ ! -f $PEERS_FILE ]; then 
			 | 
		
	
		
			
			| 
				279
			 | 
			
				
			 | 
			
			
				-    echo $'No peers were found' 
			 | 
		
	
		
			
			| 
				280
			 | 
			
				
			 | 
			
			
				-    exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				280
			 | 
			
			
				+	echo $'No peers were found' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				281
			 | 
			
			
				+	exit 0 
			 | 
		
	
		
			
			| 
				281
			 | 
			
				282
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				282
			 | 
			
				283
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				283
			 | 
			
				284
			 | 
			
			
				 ctr=0 
			 | 
		
	
		
			
			| 
				284
			 | 
			
				285
			 | 
			
			
				 while IFS='' read -r line || [[ -n "$line" ]]; do 
			 | 
		
	
		
			
			| 
				285
			 | 
			
				
			 | 
			
			
				-    ctr=$((ctr + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				286
			 | 
			
			
				+	ctr=$((ctr + 1)) 
			 | 
		
	
		
			
			| 
				286
			 | 
			
				287
			 | 
			
			
				 done < "$PEERS_FILE" 
			 | 
		
	
		
			
			| 
				287
			 | 
			
				288
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				288
			 | 
			
				289
			 | 
			
			
				 if [ ${ctr} -lt "1" ]; then 
			 | 
		
	
		
			
			| 
				289
			 | 
			
				
			 | 
			
			
				-    echo $'No peers were found' 
			 | 
		
	
		
			
			| 
				290
			 | 
			
				
			 | 
			
			
				-    exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				290
			 | 
			
			
				+	echo $'No peers were found' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				291
			 | 
			
			
				+	exit 0 
			 | 
		
	
		
			
			| 
				291
			 | 
			
				292
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				292
			 | 
			
				293
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				293
			 | 
			
				294
			 | 
			
			
				 clear 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -302,8 +303,8 @@ echo '' 
			 | 
		
	
		
			
			| 
				302
			 | 
			
				303
			 | 
			
			
				 echo $'Please choose a peer to connect to:' 
			 | 
		
	
		
			
			| 
				303
			 | 
			
				304
			 | 
			
			
				 idx=1 
			 | 
		
	
		
			
			| 
				304
			 | 
			
				305
			 | 
			
			
				 while IFS='' read -r line || [[ -n "$line" ]]; do 
			 | 
		
	
		
			
			| 
				305
			 | 
			
				
			 | 
			
			
				-    echo "    $idx. $line" 
			 | 
		
	
		
			
			| 
				306
			 | 
			
				
			 | 
			
			
				-    idx=$((idx + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				306
			 | 
			
			
				+	echo "    $idx. $line" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				307
			 | 
			
			
				+	idx=$((idx + 1)) 
			 | 
		
	
		
			
			| 
				307
			 | 
			
				308
			 | 
			
			
				 done < "$PEERS_FILE" 
			 | 
		
	
		
			
			| 
				308
			 | 
			
				309
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				309
			 | 
			
				310
			 | 
			
			
				 peer_index=0 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -311,42 +312,42 @@ read peer_index 
			 | 
		
	
		
			
			| 
				311
			 | 
			
				312
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				312
			 | 
			
				313
			 | 
			
			
				 # if no selection made 
			 | 
		
	
		
			
			| 
				313
			 | 
			
				314
			 | 
			
			
				 if [ ! $peer_index ]; then 
			 | 
		
	
		
			
			| 
				314
			 | 
			
				
			 | 
			
			
				-    echo $'Nothing was selected' 
			 | 
		
	
		
			
			| 
				315
			 | 
			
				
			 | 
			
			
				-    echo '' 
			 | 
		
	
		
			
			| 
				316
			 | 
			
				
			 | 
			
			
				-    exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				315
			 | 
			
			
				+	echo $'Nothing was selected' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				316
			 | 
			
			
				+	echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				317
			 | 
			
			
				+	exit 0 
			 | 
		
	
		
			
			| 
				317
			 | 
			
				318
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				318
			 | 
			
				319
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				319
			 | 
			
				320
			 | 
			
			
				 # get the avahi domain name 
			 | 
		
	
		
			
			| 
				320
			 | 
			
				321
			 | 
			
			
				 AVAHI_DOMAIN= 
			 | 
		
	
		
			
			| 
				321
			 | 
			
				322
			 | 
			
			
				 idx=1 
			 | 
		
	
		
			
			| 
				322
			 | 
			
				323
			 | 
			
			
				 while IFS='' read -r line || [[ -n "$line" ]]; do 
			 | 
		
	
		
			
			| 
				323
			 | 
			
				
			 | 
			
			
				-    if [ ${idx} -eq "$peer_index" ]; then 
			 | 
		
	
		
			
			| 
				324
			 | 
			
				
			 | 
			
			
				-        AVAHI_DOMAIN=${line}.local 
			 | 
		
	
		
			
			| 
				325
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				326
			 | 
			
				
			 | 
			
			
				-    idx=$((idx + 1)) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				324
			 | 
			
			
				+	if [ ${idx} -eq "$peer_index" ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				325
			 | 
			
			
				+		AVAHI_DOMAIN=${line}.local 
			 | 
		
	
		
			
			| 
				
			 | 
			
				326
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				327
			 | 
			
			
				+	idx=$((idx + 1)) 
			 | 
		
	
		
			
			| 
				327
			 | 
			
				328
			 | 
			
			
				 done < "$PEERS_FILE" 
			 | 
		
	
		
			
			| 
				328
			 | 
			
				329
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				329
			 | 
			
				330
			 | 
			
			
				 if [ ! $AVAHI_DOMAIN ]; then 
			 | 
		
	
		
			
			| 
				330
			 | 
			
				
			 | 
			
			
				-    echo $'No domain name' 
			 | 
		
	
		
			
			| 
				331
			 | 
			
				
			 | 
			
			
				-    exit 3 
			 | 
		
	
		
			
			| 
				
			 | 
			
				331
			 | 
			
			
				+	echo $'No domain name' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				332
			 | 
			
			
				+	exit 3 
			 | 
		
	
		
			
			| 
				332
			 | 
			
				333
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				333
			 | 
			
				334
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				334
			 | 
			
				335
			 | 
			
			
				 # if only mumble is installed 
			 | 
		
	
		
			
			| 
				335
			 | 
			
				336
			 | 
			
			
				 if [ ! -f $TOXIC_FILE ]; then 
			 | 
		
	
		
			
			| 
				336
			 | 
			
				
			 | 
			
			
				-    if [ -f $MUMBLE_PATH ]; then 
			 | 
		
	
		
			
			| 
				337
			 | 
			
				
			 | 
			
			
				-        $MUMBLE_PATH & 
			 | 
		
	
		
			
			| 
				338
			 | 
			
				
			 | 
			
			
				-        exit 0 
			 | 
		
	
		
			
			| 
				339
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				340
			 | 
			
				
			 | 
			
			
				-    echo $'You need mumble/toxic/qTox installed on your system' 
			 | 
		
	
		
			
			| 
				341
			 | 
			
				
			 | 
			
			
				-    if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				342
			 | 
			
				
			 | 
			
			
				-        sudo batman stop 
			 | 
		
	
		
			
			| 
				343
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				344
			 | 
			
				
			 | 
			
			
				-    exit 4 
			 | 
		
	
		
			
			| 
				
			 | 
			
				337
			 | 
			
			
				+	if [ -f $MUMBLE_PATH ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				338
			 | 
			
			
				+		$MUMBLE_PATH & 
			 | 
		
	
		
			
			| 
				
			 | 
			
				339
			 | 
			
			
				+		exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				340
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				341
			 | 
			
			
				+	echo $'You need mumble/toxic/qTox installed on your system' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				342
			 | 
			
			
				+	if [[ $SERVER_INSTALLATION == "no" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				343
			 | 
			
			
				+		sudo batman stop 
			 | 
		
	
		
			
			| 
				
			 | 
			
				344
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				345
			 | 
			
			
				+	exit 4 
			 | 
		
	
		
			
			| 
				345
			 | 
			
				346
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				346
			 | 
			
				347
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				347
			 | 
			
				348
			 | 
			
			
				 # if only tox is installed 
			 | 
		
	
		
			
			| 
				348
			 | 
			
				349
			 | 
			
			
				 if [ ! -f $MUMBLE_PATH ]; then 
			 | 
		
	
		
			
			| 
				349
			 | 
			
				
			 | 
			
			
				-    run_tox 
			 | 
		
	
		
			
			| 
				
			 | 
			
				350
			 | 
			
			
				+	run_tox 
			 | 
		
	
		
			
			| 
				350
			 | 
			
				351
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				351
			 | 
			
				352
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				352
			 | 
			
				353
			 | 
			
			
				 echo '' 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -359,32 +360,32 @@ read peer_index 
			 | 
		
	
		
			
			| 
				359
			 | 
			
				360
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				360
			 | 
			
				361
			 | 
			
			
				 # if no selection made 
			 | 
		
	
		
			
			| 
				361
			 | 
			
				362
			 | 
			
			
				 if [ ! $peer_index ]; then 
			 | 
		
	
		
			
			| 
				362
			 | 
			
				
			 | 
			
			
				-    echo $'Nothing was selected' 
			 | 
		
	
		
			
			| 
				363
			 | 
			
				
			 | 
			
			
				-    echo '' 
			 | 
		
	
		
			
			| 
				364
			 | 
			
				
			 | 
			
			
				-    exit 0 
			 | 
		
	
		
			
			| 
				
			 | 
			
				363
			 | 
			
			
				+	echo $'Nothing was selected' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				364
			 | 
			
			
				+	echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				365
			 | 
			
			
				+	exit 0 
			 | 
		
	
		
			
			| 
				365
			 | 
			
				366
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				366
			 | 
			
				367
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				367
			 | 
			
				368
			 | 
			
			
				 if [[ $peer_index == 1 ]]; then 
			 | 
		
	
		
			
			| 
				368
			 | 
			
				
			 | 
			
			
				-    if [ -f $MUMBLE_PATH ]; then 
			 | 
		
	
		
			
			| 
				369
			 | 
			
				
			 | 
			
			
				-        echo '' 
			 | 
		
	
		
			
			| 
				370
			 | 
			
				
			 | 
			
			
				-        echo $'To setup for the first time click "Add New", then set:' 
			 | 
		
	
		
			
			| 
				371
			 | 
			
				
			 | 
			
			
				-        echo $"    Label:    $AVAHI_DOMAIN" 
			 | 
		
	
		
			
			| 
				372
			 | 
			
				
			 | 
			
			
				-        echo $"    Address:  $AVAHI_DOMAIN" 
			 | 
		
	
		
			
			| 
				373
			 | 
			
				
			 | 
			
			
				-        echo $'    Port:     64738' 
			 | 
		
	
		
			
			| 
				374
			 | 
			
				
			 | 
			
			
				-        echo $"    Username: $USER" 
			 | 
		
	
		
			
			| 
				375
			 | 
			
				
			 | 
			
			
				-        echo '' 
			 | 
		
	
		
			
			| 
				376
			 | 
			
				
			 | 
			
			
				-        echo $'Press Enter to continue.' 
			 | 
		
	
		
			
			| 
				377
			 | 
			
				
			 | 
			
			
				-        echo '' 
			 | 
		
	
		
			
			| 
				378
			 | 
			
				
			 | 
			
			
				-        read peer_index 
			 | 
		
	
		
			
			| 
				379
			 | 
			
				
			 | 
			
			
				-        $MUMBLE_PATH & 
			 | 
		
	
		
			
			| 
				380
			 | 
			
				
			 | 
			
			
				-    else 
			 | 
		
	
		
			
			| 
				381
			 | 
			
				
			 | 
			
			
				-        echo $'Mumble may not be installed on this system' 
			 | 
		
	
		
			
			| 
				382
			 | 
			
				
			 | 
			
			
				-        exit 5 
			 | 
		
	
		
			
			| 
				383
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				369
			 | 
			
			
				+	if [ -f $MUMBLE_PATH ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				370
			 | 
			
			
				+		echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				371
			 | 
			
			
				+		echo $'To setup for the first time click "Add New", then set:' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				372
			 | 
			
			
				+		echo $"    Label:    $AVAHI_DOMAIN" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				373
			 | 
			
			
				+		echo $"    Address:  $AVAHI_DOMAIN" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				374
			 | 
			
			
				+		echo $'    Port:     64738' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				375
			 | 
			
			
				+		echo $"    Username: $USER" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				376
			 | 
			
			
				+		echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				377
			 | 
			
			
				+		echo $'Press Enter to continue.' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				378
			 | 
			
			
				+		echo '' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				379
			 | 
			
			
				+		read peer_index 
			 | 
		
	
		
			
			| 
				
			 | 
			
				380
			 | 
			
			
				+		$MUMBLE_PATH & 
			 | 
		
	
		
			
			| 
				
			 | 
			
				381
			 | 
			
			
				+	else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				382
			 | 
			
			
				+		echo $'Mumble may not be installed on this system' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				383
			 | 
			
			
				+		exit 5 
			 | 
		
	
		
			
			| 
				
			 | 
			
				384
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				384
			 | 
			
				385
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				385
			 | 
			
				386
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				386
			 | 
			
				387
			 | 
			
			
				 if [[ $peer_index == 2 ]]; then 
			 | 
		
	
		
			
			| 
				387
			 | 
			
				
			 | 
			
			
				-    run_tox 
			 | 
		
	
		
			
			| 
				
			 | 
			
				388
			 | 
			
			
				+	run_tox 
			 | 
		
	
		
			
			| 
				388
			 | 
			
				389
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				389
			 | 
			
				390
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				390
			 | 
			
				391
			 | 
			
			
				 exit 0 
			 |