Browse Source

sleep for a while to wait for tox keys to be generated

Bob Mottram 9 years ago
parent
commit
c202ad4e6e
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/freedombone-image-mesh

+ 4
- 0
src/freedombone-image-mesh View File

463
 		TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
463
 		TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
464
 	fi
464
 	fi
465
 
465
 
466
+	echo $'Enabling toxcore daemon' >> $INSTALL_LOG
467
+	systemctl enable tox-bootstrapd.service
466
 	echo $'Regenerating Tox bootstrap node keys' >> $INSTALL_LOG
468
 	echo $'Regenerating Tox bootstrap node keys' >> $INSTALL_LOG
467
 	systemctl stop tox-bootstrapd.service
469
 	systemctl stop tox-bootstrapd.service
468
 	if [ -f /var/lib/tox-bootstrapd/keys ]; then
470
 	if [ -f /var/lib/tox-bootstrapd/keys ]; then
469
 		rm /var/lib/tox-bootstrapd/keys
471
 		rm /var/lib/tox-bootstrapd/keys
470
 	fi
472
 	fi
471
 	systemctl start tox-bootstrapd.service
473
 	systemctl start tox-bootstrapd.service
474
+	# sleep for a while so that the tox keys can be generated
475
+	sleep 30
472
 	TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
476
 	TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
473
 	TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
477
 	TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
474
 	if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
478
 	if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then