diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 8c0e8582..a194349a 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -358,9 +358,8 @@ function show_domains { return fi # There are two forms of addresses: "x / y.onion" and "x.onion" - intermediate=$(echo "$selected_addresses" | awk -F '.' '{print $2}') - if [[ "$intermediate" == *'//'* ]]; then - onion_addr=$(echo "$intermediate" | awk -F ' ' '{print $3}').onion + if [[ "$selected_addresses" == *'/'* ]]; then + onion_addr=$(echo "$selected_addresses" | awk -F '/' '{print $2}' | awk -F ' ' '{print $2}').onion else onion_addr="$selected_addresses".onion fi