From 11f58991b1858e43a39efc896bb7fd6695ae6fd3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 19 Oct 2016 10:32:57 +0100 Subject: [PATCH] Wait for syslog when installing tox --- src/freedombone-app-tox | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 8b601473..f0a3b077 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -363,7 +363,9 @@ function install_tox_node { systemctl restart tox-bootstrapd.service - TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1) + sleep 3 + + TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | tail -n 1 | awk -F ' ' '{print $8}') if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then echo $'Could not obtain the tox node public key' exit 6529