Browse Source

Wait for syslog when installing tox

Bob Mottram 8 years ago
parent
commit
11f58991b1
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/freedombone-app-tox

+ 3
- 1
src/freedombone-app-tox View File

@@ -363,7 +363,9 @@ function install_tox_node {
363 363
 
364 364
     systemctl restart tox-bootstrapd.service
365 365
 
366
-    TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
366
+    sleep 3
367
+
368
+    TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | tail -n 1 | awk -F ' ' '{print $8}')
367 369
     if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
368 370
         echo $'Could not obtain the tox node public key'
369 371
         exit 6529