| 
				
			 | 
			
			
				@@ -73,6 +73,9 @@ MESH_INSTALL_DIR=/var/lib 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				73
			 | 
			
			
				 ZERONET_INSTALL=$MESH_INSTALL_DIR/zeronet 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				74
			 | 
			
			
				 TOX_USERS_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-tox-users.html 
			 | 
		
	
		
			
			| 
				75
			 | 
			
				75
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				76
			 | 
			
			
				+# whether to enable zeronet 
			 | 
		
	
		
			
			| 
				
			 | 
			
				77
			 | 
			
			
				+ENABLE_ZERONET= 
			 | 
		
	
		
			
			| 
				
			 | 
			
				78
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				79
			 | 
			
			
				 function create_ram_disk { 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				80
			 | 
			
			
				     ramdisk_size_mb=$1 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				81
			 | 
			
			
				     if [ ! -d /mnt/ramdisk ]; then 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -467,10 +470,19 @@ function configure_toxcore { 
			 | 
		
	
		
			
			| 
				467
			 | 
			
				470
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				468
			 | 
			
				471
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				469
			 | 
			
				472
			 | 
			
			
				 function create_tox_user { 
			 | 
		
	
		
			
			| 
				470
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /home/${MY_USERNAME}/.config/tox/data.tox ]; then 
			 | 
		
	
		
			
			| 
				471
			 | 
			
				
			 | 
			
			
				-        toxid -u $MY_USERNAME -n data 
			 | 
		
	
		
			
			| 
				472
			 | 
			
				
			 | 
			
			
				-        chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/tox 
			 | 
		
	
		
			
			| 
				
			 | 
			
				473
			 | 
			
			
				+    # remove any existing user 
			 | 
		
	
		
			
			| 
				
			 | 
			
				474
			 | 
			
			
				+    if [ -f /home/${MY_USERNAME}/.config/tox/data.tox ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				475
			 | 
			
			
				+        rm -f /home/${MY_USERNAME}/.config/tox/data* 
			 | 
		
	
		
			
			| 
				
			 | 
			
				476
			 | 
			
			
				+    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				477
			 | 
			
			
				+    if [ -d /home/${MY_USERNAME}/.config/tox/avatars ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				478
			 | 
			
			
				+        rm -rf /home/${MY_USERNAME}/.config/tox/avatars 
			 | 
		
	
		
			
			| 
				473
			 | 
			
				479
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				480
			 | 
			
			
				+    if [ ! -f /home/${MY_USERNAME}/.first_boot ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				481
			 | 
			
			
				+        touch /home/${MY_USERNAME}/.first_boot 
			 | 
		
	
		
			
			| 
				
			 | 
			
				482
			 | 
			
			
				+    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				483
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				484
			 | 
			
			
				+    toxid -u $MY_USERNAME -n data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				485
			 | 
			
			
				+    chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/tox 
			 | 
		
	
		
			
			| 
				474
			 | 
			
				486
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				475
			 | 
			
				487
			 | 
			
			
				     if [ ! -d /home/$MY_USERNAME/Desktop ]; then 
			 | 
		
	
		
			
			| 
				476
			 | 
			
				488
			 | 
			
			
				         return 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -615,7 +627,9 @@ function mesh_restart_daemons { 
			 | 
		
	
		
			
			| 
				615
			 | 
			
				627
			 | 
			
			
				     systemctl restart avahi-daemon 
			 | 
		
	
		
			
			| 
				616
			 | 
			
				628
			 | 
			
			
				     systemctl restart ssh 
			 | 
		
	
		
			
			| 
				617
			 | 
			
				629
			 | 
			
			
				     systemctl restart tox-bootstrapd 
			 | 
		
	
		
			
			| 
				618
			 | 
			
				
			 | 
			
			
				-    systemctl restart zeronet 
			 | 
		
	
		
			
			| 
				
			 | 
			
				630
			 | 
			
			
				+    if [ $ENABLE_ZERONET ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				631
			 | 
			
			
				+        systemctl restart zeronet 
			 | 
		
	
		
			
			| 
				
			 | 
			
				632
			 | 
			
			
				+    fi 
			 | 
		
	
		
			
			| 
				619
			 | 
			
				633
			 | 
			
			
				     echo $'Daemons restarted' >> $INSTALL_LOG 
			 | 
		
	
		
			
			| 
				620
			 | 
			
				634
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				621
			 | 
			
				635
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -800,13 +814,15 @@ if [ -f $MESH_INSTALL_SETUP ]; then 
			 | 
		
	
		
			
			| 
				800
			 | 
			
				814
			 | 
			
			
				     setup_amnesic_data 
			 | 
		
	
		
			
			| 
				801
			 | 
			
				815
			 | 
			
			
				     change_avahi_name 
			 | 
		
	
		
			
			| 
				802
			 | 
			
				816
			 | 
			
			
				     regenerate_ssh_host_keys 
			 | 
		
	
		
			
			| 
				803
			 | 
			
				
			 | 
			
			
				-    configure_zeronet_blog 
			 | 
		
	
		
			
			| 
				804
			 | 
			
				
			 | 
			
			
				-    configure_zeronet_mail 
			 | 
		
	
		
			
			| 
				805
			 | 
			
				
			 | 
			
			
				-    configure_zeronet_forum 
			 | 
		
	
		
			
			| 
				806
			 | 
			
				
			 | 
			
			
				-    configure_zeronet_id 
			 | 
		
	
		
			
			| 
				
			 | 
			
				817
			 | 
			
			
				+    if [ $ENABLE_ZERONET ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				818
			 | 
			
			
				+        configure_zeronet_blog 
			 | 
		
	
		
			
			| 
				
			 | 
			
				819
			 | 
			
			
				+        configure_zeronet_mail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				820
			 | 
			
			
				+        configure_zeronet_forum 
			 | 
		
	
		
			
			| 
				
			 | 
			
				821
			 | 
			
			
				+        configure_zeronet_id 
			 | 
		
	
		
			
			| 
				
			 | 
			
				822
			 | 
			
			
				+        configure_zeronet 
			 | 
		
	
		
			
			| 
				
			 | 
			
				823
			 | 
			
			
				+    fi 
			 | 
		
	
		
			
			| 
				807
			 | 
			
				824
			 | 
			
			
				     configure_toxcore 
			 | 
		
	
		
			
			| 
				808
			 | 
			
				825
			 | 
			
			
				     create_tox_user 
			 | 
		
	
		
			
			| 
				809
			 | 
			
				
			 | 
			
			
				-    configure_zeronet 
			 | 
		
	
		
			
			| 
				810
			 | 
			
				826
			 | 
			
			
				     disable_password_logins 
			 | 
		
	
		
			
			| 
				811
			 | 
			
				827
			 | 
			
			
				     mesh_amnesic 
			 | 
		
	
		
			
			| 
				812
			 | 
			
				828
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -821,10 +837,10 @@ if [ -f $MESH_INSTALL_SETUP ]; then 
			 | 
		
	
		
			
			| 
				821
			 | 
			
				837
			 | 
			
			
				     if [ ! -f $MESH_INSTALL_COMPLETED ]; then 
			 | 
		
	
		
			
			| 
				822
			 | 
			
				838
			 | 
			
			
				         echo $'Mesh node setup complete' >> $INSTALL_LOG 
			 | 
		
	
		
			
			| 
				823
			 | 
			
				839
			 | 
			
			
				         touch $MESH_INSTALL_COMPLETED 
			 | 
		
	
		
			
			| 
				824
			 | 
			
				
			 | 
			
			
				-		if [ -d /home/$MY_USERNAME/Desktop ]; then 
			 | 
		
	
		
			
			| 
				825
			 | 
			
				
			 | 
			
			
				-			touch $FIRST_BOOT 
			 | 
		
	
		
			
			| 
				826
			 | 
			
				
			 | 
			
			
				-			chown ${MY_USERNAME}:${MY_USERNAME} $FIRST_BOOT 
			 | 
		
	
		
			
			| 
				827
			 | 
			
				
			 | 
			
			
				-		fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				840
			 | 
			
			
				+        if [ -d /home/$MY_USERNAME/Desktop ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				841
			 | 
			
			
				+            touch $FIRST_BOOT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				842
			 | 
			
			
				+            chown ${MY_USERNAME}:${MY_USERNAME} $FIRST_BOOT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				843
			 | 
			
			
				+        fi 
			 | 
		
	
		
			
			| 
				828
			 | 
			
				844
			 | 
			
			
				         reboot 
			 | 
		
	
		
			
			| 
				829
			 | 
			
				845
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				830
			 | 
			
				846
			 | 
			
			
				 fi 
			 |