Browse Source

Removing tox settings as a function

Bob Mottram 9 years ago
parent
commit
5de7b0cf29
1 changed files with 13 additions and 7 deletions
  1. 13
    7
      src/freedombone-image-mesh

+ 13
- 7
src/freedombone-image-mesh View File

@@ -465,6 +465,16 @@ function configure_zeronet_id {
465 465
 	echo $'Update of ZeroID completed' >> $INSTALL_LOG
466 466
 }
467 467
 
468
+function amnesic_remove_tox {
469
+	echo $'Clearing qtox client settings' >> $INSTALL_LOG
470
+	if [ -d /home/${MY_USERNAME}/.config/tox ]; then
471
+		shred -zu /home/${MY_USERNAME}/.config/tox/*.tox
472
+		shred -zu /home/${MY_USERNAME}/.config/tox/*.db
473
+		shred -zu /home/${MY_USERNAME}/.config/tox/*.ini
474
+		rm -rf /home/${MY_USERNAME}/.config/tox
475
+	fi
476
+}
477
+
468 478
 function configure_toxcore {
469 479
 	echo $'Configuring toxcore' >> $INSTALL_LOG
470 480
 
@@ -491,13 +501,7 @@ function configure_toxcore {
491 501
 	echo "$TOX_PUBLIC_KEY" > $TOX_BOOTSTRAP_ID_FILE
492 502
 	echo $'Configured toxcore' >> $INSTALL_LOG
493 503
 
494
-	echo $'Clearing toxic client settings' >> $INSTALL_LOG
495
-	if [ -d /home/${MY_USERNAME}/.config/tox ]; then
496
-		shred -zu /home/${MY_USERNAME}/.config/tox/*.tox
497
-		shred -zu /home/${MY_USERNAME}/.config/tox/*.db
498
-		shred -zu /home/${MY_USERNAME}/.config/tox/*.ini
499
-		rm -rf /home/${MY_USERNAME}/.config/tox
500
-	fi
504
+	amnesic_remove_tox
501 505
 	echo $'toxic client configured' >> $INSTALL_LOG
502 506
 }
503 507
 
@@ -537,6 +541,8 @@ function mesh_amnesic {
537 541
 
538 542
 	echo '#!/bin/bash' > /usr/bin/amnesic
539 543
 	echo '' >> /usr/bin/amnesic
544
+	echo "shred -zu /var/log/${PROJECT_NAME}*" >> /usr/bin/amnesic
545
+	echo '' >> /usr/bin/amnesic
540 546
 	echo 'MY_USERNAME=$1' >> /usr/bin/amnesic
541 547
 	echo -n "${PROJECT_NAME}-image-mesh " >> /usr/bin/amnesic
542 548
 	echo '$MY_USERNAME amnesic' >> /usr/bin/amnesic