소스 검색

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,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