Show ip address
This commit is contained in:
parent
3f5762078f
commit
89fb7a5886
|
@ -228,6 +228,13 @@ function show_domains {
|
||||||
|
|
||||||
W=()
|
W=()
|
||||||
|
|
||||||
|
W+=("IPv4" "$(get_ipv4_address) / $(get_external_ipv4_address)")
|
||||||
|
ipv6_address="$(get_ipv6_address)"
|
||||||
|
if [ ${#ipv6_address} -gt 0 ]; then
|
||||||
|
W+=("IPv6" "${ipv6_address}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if grep -q "ssh onion domain" "$COMPLETION_FILE"; then
|
if grep -q "ssh onion domain" "$COMPLETION_FILE"; then
|
||||||
domain_onion=$(grep 'ssh onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}')
|
domain_onion=$(grep 'ssh onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}')
|
||||||
W+=("ssh" "${DEFAULT_DOMAIN_NAME} / ${domain_onion}")
|
W+=("ssh" "${DEFAULT_DOMAIN_NAME} / ${domain_onion}")
|
||||||
|
@ -323,101 +330,6 @@ function show_domains {
|
||||||
dialog --backtitle $"Freedombone Control Panel" --title $"Domains" --menu $"Use Shift+cursors to select and copy onion addresses" $((height-4)) $((width-4)) $((height-4)) "${W[@]}" 3>&2 2>&1 1>&3
|
dialog --backtitle $"Freedombone Control Panel" --title $"Domains" --menu $"Use Shift+cursors to select and copy onion addresses" $((height-4)) $((width-4)) $((height-4)) "${W[@]}" 3>&2 2>&1 1>&3
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_domains_old {
|
|
||||||
read_config_param "DEFAULT_DOMAIN_NAME"
|
|
||||||
|
|
||||||
echo 'Domains'
|
|
||||||
echo '======='
|
|
||||||
echo ''
|
|
||||||
echo -n -e "$(pad_string 'Name')"
|
|
||||||
echo -n -e "$(pad_string 'ICANN')"
|
|
||||||
echo -n -e "$(pad_string 'Tor')"
|
|
||||||
echo ''
|
|
||||||
echo '--------------------------------------------------------------------------'
|
|
||||||
if grep -q "ssh onion domain" "$COMPLETION_FILE"; then
|
|
||||||
echo -n -e "$(pad_string 'ssh')"
|
|
||||||
echo -n -e "$(pad_string "${DEFAULT_DOMAIN_NAME}")"
|
|
||||||
grep 'ssh onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}'
|
|
||||||
fi
|
|
||||||
if grep -q "email onion domain" "$COMPLETION_FILE"; then
|
|
||||||
echo -n -e "$(pad_string 'Email')"
|
|
||||||
echo -n -e "$(pad_string "${DEFAULT_DOMAIN_NAME}")"
|
|
||||||
grep 'email onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}'
|
|
||||||
fi
|
|
||||||
if grep -q "sks onion domain" "$COMPLETION_FILE"; then
|
|
||||||
read_config_param "KEYSERVER_DOMAIN_NAME"
|
|
||||||
echo -n -e "$(pad_string 'SKS')"
|
|
||||||
echo -n -e "$(pad_string "${KEYSERVER_DOMAIN_NAME}")"
|
|
||||||
grep 'sks onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
|
||||||
for app_name in ${APPS_INSTALLED_NAMES[@]}
|
|
||||||
do
|
|
||||||
if ! grep -q "SHOW_ON_ABOUT=1" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# handle the foibles of capitalisation
|
|
||||||
if ! grep -q "${app_name} domain" "$COMPLETION_FILE"; then
|
|
||||||
app_name_upper=$(echo "${app_name}" | awk '{print toupper($0)}')
|
|
||||||
if grep -q "${app_name_upper} domain" "$COMPLETION_FILE"; then
|
|
||||||
app_name=${app_name_upper}
|
|
||||||
else
|
|
||||||
app_name_first_upper="$(tr '[:lower:]' '[:upper:]' <<< "${app_name:0:1}")${app_name:1}"
|
|
||||||
if grep -q "${app_name_first_upper} domain" "$COMPLETION_FILE"; then
|
|
||||||
app_name=${app_name_first_upper}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${#app_name} -gt 0 ]; then
|
|
||||||
icann_address=$(get_app_icann_address "$app_name")
|
|
||||||
if grep -q "SHOW_ICANN_ADDRESS_ON_ABOUT=0" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"; then
|
|
||||||
icann_address='-'
|
|
||||||
fi
|
|
||||||
if [[ "$ONION_ONLY" != 'no' ]]; then
|
|
||||||
if [[ "${icann_address}" != "${LOCAL_NAME}.local" ]]; then
|
|
||||||
icann_address='-'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
onion_address=$(get_app_onion_address "$app_name")
|
|
||||||
if [ ${#onion_address} -eq 0 ]; then
|
|
||||||
onion_address="-"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n -e "$(pad_string "${app_name}")"
|
|
||||||
echo -n -e "$(pad_string "${icann_address}")"
|
|
||||||
echo "${onion_address}"
|
|
||||||
|
|
||||||
if grep -q "mobile${app_name} onion domain" "$COMPLETION_FILE"; then
|
|
||||||
onion_address=$(get_app_onion_address "${app_name}" "mobile")
|
|
||||||
echo -n -e "$(pad_string "${app_name} (mobile)")"
|
|
||||||
echo -n -e "$(pad_string "${icann_address}")"
|
|
||||||
echo "${onion_address}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if grep -q "rss reader domain" "$COMPLETION_FILE"; then
|
|
||||||
if [ -d /var/lib/tor/hidden_service_ttrss ]; then
|
|
||||||
echo -n -e "$(pad_string 'RSS reader')"
|
|
||||||
RSSDOM='-'
|
|
||||||
echo -n -e "$(pad_string ${RSSDOM})"
|
|
||||||
echo -n "$(cat /var/lib/tor/hidden_service_ttrss/hostname)"
|
|
||||||
echo ''
|
|
||||||
fi
|
|
||||||
if [ -d /var/lib/tor/hidden_service_mobilerss ]; then
|
|
||||||
echo -n -e "$(pad_string 'RSS mobile')"
|
|
||||||
RSSMOBILEDOM='-'
|
|
||||||
echo -n -e "$(pad_string ${RSSMOBILEDOM})"
|
|
||||||
echo -n "$(cat /var/lib/tor/hidden_service_mobilerss/hostname)"
|
|
||||||
echo ''
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo ''
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_users {
|
function show_users {
|
||||||
echo 'Users'
|
echo 'Users'
|
||||||
echo '====='
|
echo '====='
|
||||||
|
|
Loading…
Reference in New Issue