瀏覽代碼

Better handling of toxcore logging

Bob Mottram 8 年之前
父節點
當前提交
c26f366e31
共有 1 個檔案被更改,包括 15 行新增5 行删除
  1. 15
    5
      src/freedombone-app-tox

+ 15
- 5
src/freedombone-app-tox 查看文件

701
         mesh_tox_avahi
701
         mesh_tox_avahi
702
         mesh_tox_client
702
         mesh_tox_client
703
     else
703
     else
704
-        ${PROJECT_NAME}-logging on
705
-        install_tox_node
704
+        avoid_tor_restart=
706
         if [ -f $IMAGE_PASSWORD_FILE ]; then
705
         if [ -f $IMAGE_PASSWORD_FILE ]; then
707
             if [[ $ONION_ONLY != 'no' ]]; then
706
             if [[ $ONION_ONLY != 'no' ]]; then
708
-                ${PROJECT_NAME}-logging off --onion
709
-            else
710
-                ${PROJECT_NAME}-logging off
707
+                avoid_tor_restart=1
711
             fi
708
             fi
709
+        fi
710
+
711
+        if [ $avoid_tor_restart ]; then
712
+            ${PROJECT_NAME}-logging on --onion
713
+        else
714
+            ${PROJECT_NAME}-logging on
715
+        fi
716
+
717
+        install_tox_node
718
+
719
+        if [ $avoid_tor_restart ]; then
720
+            ${PROJECT_NAME}-logging off --onion
712
         else
721
         else
713
             ${PROJECT_NAME}-logging off
722
             ${PROJECT_NAME}-logging off
714
         fi
723
         fi
724
+
715
         tox_avahi
725
         tox_avahi
716
         install_tox_client
726
         install_tox_client
717
     fi
727
     fi