From c26f366e3186419d66b3a377629d8159f0c80bc7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Nov 2016 23:28:15 +0000 Subject: [PATCH] Better handling of toxcore logging --- src/freedombone-app-tox | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index dc68cea0..537bc681 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -701,17 +701,27 @@ function install_tox { mesh_tox_avahi mesh_tox_client else - ${PROJECT_NAME}-logging on - install_tox_node + avoid_tor_restart= if [ -f $IMAGE_PASSWORD_FILE ]; then if [[ $ONION_ONLY != 'no' ]]; then - ${PROJECT_NAME}-logging off --onion - else - ${PROJECT_NAME}-logging off + avoid_tor_restart=1 fi + fi + + if [ $avoid_tor_restart ]; then + ${PROJECT_NAME}-logging on --onion + else + ${PROJECT_NAME}-logging on + fi + + install_tox_node + + if [ $avoid_tor_restart ]; then + ${PROJECT_NAME}-logging off --onion else ${PROJECT_NAME}-logging off fi + tox_avahi install_tox_client fi