From c202ad4e6e1ea1ddb37986332673b0bd94d4a548 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 30 May 2016 18:30:00 +0100 Subject: [PATCH] sleep for a while to wait for tox keys to be generated --- src/freedombone-image-mesh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 8654d0e2..33f0d950 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -463,12 +463,16 @@ function configure_toxcore { TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') fi + echo $'Enabling toxcore daemon' >> $INSTALL_LOG + systemctl enable tox-bootstrapd.service echo $'Regenerating Tox bootstrap node keys' >> $INSTALL_LOG systemctl stop tox-bootstrapd.service if [ -f /var/lib/tox-bootstrapd/keys ]; then rm /var/lib/tox-bootstrapd/keys fi systemctl start tox-bootstrapd.service + # sleep for a while so that the tox keys can be generated + sleep 30 TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1) if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then