|  | @@ -597,19 +597,6 @@ function mesh_tox_node {
 | 
	
		
			
			| 597 | 597 |  	fi
 | 
	
		
			
			| 598 | 598 |  
 | 
	
		
			
			| 599 | 599 |  	if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
 | 
	
		
			
			| 600 |  | -		TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
 | 
	
		
			
			| 601 |  | -	else
 | 
	
		
			
			| 602 |  | -		TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
 | 
	
		
			
			| 603 |  | -	fi
 | 
	
		
			
			| 604 |  | -	if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
 | 
	
		
			
			| 605 |  | -		TOXID_REPO=$TOXID_REPO_MAIN
 | 
	
		
			
			| 606 |  | -	fi
 | 
	
		
			
			| 607 |  | -	if [ ! $TOXID_REPO ]; then
 | 
	
		
			
			| 608 |  | -		echo $'No ToxID repo was specified'
 | 
	
		
			
			| 609 |  | -		exit 78252
 | 
	
		
			
			| 610 |  | -	fi
 | 
	
		
			
			| 611 |  | -
 | 
	
		
			
			| 612 |  | -	if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
 | 
	
		
			
			| 613 | 600 |  		TOX_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
 | 
	
		
			
			| 614 | 601 |  	else
 | 
	
		
			
			| 615 | 602 |  		TOX_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
 | 
	
	
		
			
			|  | @@ -658,6 +645,33 @@ function mesh_tox_node {
 | 
	
		
			
			| 658 | 645 |  	fi
 | 
	
		
			
			| 659 | 646 |  }
 | 
	
		
			
			| 660 | 647 |  
 | 
	
		
			
			|  | 648 | +function mesh_tox_avahi {
 | 
	
		
			
			|  | 649 | +	if [ ! -d $rootdir/etc/avahi ]; then
 | 
	
		
			
			|  | 650 | +		echo $'tox_avahi: avahi is not installed'
 | 
	
		
			
			|  | 651 | +		exit 87359
 | 
	
		
			
			|  | 652 | +	fi
 | 
	
		
			
			|  | 653 | +
 | 
	
		
			
			|  | 654 | +	if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
 | 
	
		
			
			|  | 655 | +		TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
 | 
	
		
			
			|  | 656 | +	else
 | 
	
		
			
			|  | 657 | +		TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
 | 
	
		
			
			|  | 658 | +	fi
 | 
	
		
			
			|  | 659 | +	if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
 | 
	
		
			
			|  | 660 | +		TOXID_REPO=$TOXID_REPO_MAIN
 | 
	
		
			
			|  | 661 | +	fi
 | 
	
		
			
			|  | 662 | +	if [ ! $TOXID_REPO ]; then
 | 
	
		
			
			|  | 663 | +		echo $'No ToxID repo was specified'
 | 
	
		
			
			|  | 664 | +		exit 78252
 | 
	
		
			
			|  | 665 | +	fi
 | 
	
		
			
			|  | 666 | +	
 | 
	
		
			
			|  | 667 | +	# install a command to obtain the Tox ID
 | 
	
		
			
			|  | 668 | +	chroot "$rootdir" $INSTALL_DIR
 | 
	
		
			
			|  | 669 | +	chroot "$rootdir" git clone $TOXID_REPO $INSTALL_DIR/toxid
 | 
	
		
			
			|  | 670 | +	if [ ! -d $rootdir$INSTALL_DIR/toxid ]; then
 | 
	
		
			
			|  | 671 | +		exit 63921
 | 
	
		
			
			|  | 672 | +	fi
 | 
	
		
			
			|  | 673 | +}
 | 
	
		
			
			|  | 674 | +
 | 
	
		
			
			| 661 | 675 |  function mesh_tox_client {
 | 
	
		
			
			| 662 | 676 |  	if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
 | 
	
		
			
			| 663 | 677 |  		TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
 | 
	
	
		
			
			|  | @@ -822,6 +836,7 @@ initialise_mesh() {
 | 
	
		
			
			| 822 | 836 |  	mesh_avahi
 | 
	
		
			
			| 823 | 837 |  	mesh_batman
 | 
	
		
			
			| 824 | 838 |  	mesh_tox_node
 | 
	
		
			
			|  | 839 | +	mesh_tox_avahi
 | 
	
		
			
			| 825 | 840 |  	mesh_tox_client
 | 
	
		
			
			| 826 | 841 |  	mesh_zeronet
 | 
	
		
			
			| 827 | 842 |  
 |