浏览代码

Wait for syslog when installing tox

Bob Mottram 8 年前
父节点
当前提交
11f58991b1
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/freedombone-app-tox

+ 3
- 1
src/freedombone-app-tox 查看文件

363
 
363
 
364
     systemctl restart tox-bootstrapd.service
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
     if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
369
     if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
368
         echo $'Could not obtain the tox node public key'
370
         echo $'Could not obtain the tox node public key'
369
         exit 6529
371
         exit 6529