Show domain for email and xmpp

This commit is contained in:
Bob Mottram 2016-01-03 12:46:36 +00:00
parent d90918e19d
commit ed2804ba7b
1 changed files with 8 additions and 10 deletions

View File

@ -119,6 +119,8 @@ function pad_string {
} }
function show_domains { function show_domains {
DEFAULT_DOMAIN_NAME=$(cat $CONFIG_FILE | grep "DEFAULT_DOMAIN_NAME=" | awk -F '=' '{print $2}')
echo 'Domains' echo 'Domains'
echo '=======' echo '======='
echo '' echo ''
@ -129,9 +131,14 @@ function show_domains {
echo '--------------------------------------------------------------------------' echo '--------------------------------------------------------------------------'
if grep -q "Email onion domain" $COMPLETION_FILE; then if grep -q "Email onion domain" $COMPLETION_FILE; then
echo -n -e "$(pad_string 'Email')" echo -n -e "$(pad_string 'Email')"
echo -n -e "$(pad_string ' ')" echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
echo "$(cat ${COMPLETION_FILE} | grep 'Email onion domain' | awk -F ':' '{print $2}')" echo "$(cat ${COMPLETION_FILE} | grep 'Email onion domain' | awk -F ':' '{print $2}')"
fi fi
if grep -q "XMPP onion domain" $COMPLETION_FILE; then
echo -n -e "$(pad_string 'XMPP')"
echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
echo "$(cat ${COMPLETION_FILE} | grep 'XMPP onion domain' | awk -F ':' '{print $2}')"
fi
if grep -q "Wiki domain" $COMPLETION_FILE; then if grep -q "Wiki domain" $COMPLETION_FILE; then
echo -n -e "$(pad_string 'Wiki')" echo -n -e "$(pad_string 'Wiki')"
WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}') WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}')
@ -186,15 +193,6 @@ function show_domains {
fi fi
echo '' echo ''
fi fi
if grep -q "XMPP domain" $COMPLETION_FILE; then
echo -n -e "$(pad_string 'XMPP')"
XMPPDOM=$(cat ${COMPLETION_FILE} | grep 'XMPP domain' | awk -F ':' '{print $2}')
echo -n -e "$(pad_string ${XMPPDOM})"
if [ -d /var/lib/tor/hidden_service_xmpp ]; then
echo -n "$(cat /var/lib/tor/hidden_service_xmpp/hostname)"
fi
echo ''
fi
echo '' echo ''
} }