Don't show local addresses when in onion only

This commit is contained in:
Bob Mottram 2017-06-08 10:48:46 +01:00
parent c833eecb79
commit 16350b4c36
1 changed files with 6 additions and 0 deletions

View File

@ -110,6 +110,7 @@ read_config_param SMTP_PROXY_USERNAME
read_config_param SMTP_PROXY_PASSWORD read_config_param SMTP_PROXY_PASSWORD
read_config_param USB_DRIVE read_config_param USB_DRIVE
read_config_param MY_USERNAME read_config_param MY_USERNAME
read_config_param ONION_ONLY
if [[ $USB_DRIVE == *"dev"* ]]; then if [[ $USB_DRIVE == *"dev"* ]]; then
USB_DRIVE=$(echo ${USB_DRIVE} | awk -F '/' '{print $3}' | sed 's|1||g' | sed 's|2||g') USB_DRIVE=$(echo ${USB_DRIVE} | awk -F '/' '{print $3}' | sed 's|1||g' | sed 's|2||g')
fi fi
@ -406,6 +407,11 @@ function show_domains {
if grep -q "SHOW_ICANN_ADDRESS_ON_ABOUT=0" /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}; then if grep -q "SHOW_ICANN_ADDRESS_ON_ABOUT=0" /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}; then
icann_address='-' icann_address='-'
fi fi
if [[ $ONION_ONLY != 'no' ]]; then
if [[ ${icann_address} != ${PROJECT_NAME}.local ]]; then
icann_address='-'
fi
fi
onion_address=$(get_app_onion_address "$app_name") onion_address=$(get_app_onion_address "$app_name")
if [ ${#onion_address} -eq 0 ]; then if [ ${#onion_address} -eq 0 ]; then
onion_address="-" onion_address="-"