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