diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 36bd0a94..11cc7c4f 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -189,8 +189,10 @@ function remove_tox { } function configure_firewall_for_tox { - if grep -Fxq "configure_firewall_for_tox" $COMPLETION_FILE; then - return + if [ -f $COMPLETION_FILE ]; then + if grep -Fxq "configure_firewall_for_tox" $COMPLETION_FILE; then + return + fi fi if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then # docker does its own firewalling @@ -204,7 +206,9 @@ function configure_firewall_for_tox { save_firewall_settings OPEN_PORTS+=("Tox $TOX_PORT") - echo 'configure_firewall_for_tox' >> $COMPLETION_FILE + if [ -f $COMPLETION_FILE ]; then + echo 'configure_firewall_for_tox' >> $COMPLETION_FILE + fi } function tox_avahi {