Browse Source

Show domain for email and xmpp

Bob Mottram 9 years ago
parent
commit
ed2804ba7b
1 changed files with 8 additions and 10 deletions
  1. 8
    10
      src/freedombone-controlpanel

+ 8
- 10
src/freedombone-controlpanel View File

@@ -119,6 +119,8 @@ function pad_string {
119 119
 }
120 120
 
121 121
 function show_domains {
122
+    DEFAULT_DOMAIN_NAME=$(cat $CONFIG_FILE | grep "DEFAULT_DOMAIN_NAME=" | awk -F '=' '{print $2}')
123
+
122 124
     echo 'Domains'
123 125
     echo '======='
124 126
     echo ''
@@ -129,9 +131,14 @@ function show_domains {
129 131
     echo '--------------------------------------------------------------------------'
130 132
     if grep -q "Email onion domain" $COMPLETION_FILE; then
131 133
         echo -n -e "$(pad_string 'Email')"
132
-        echo -n -e "$(pad_string ' ')"
134
+        echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
133 135
         echo "$(cat ${COMPLETION_FILE} | grep 'Email onion domain' | awk -F ':' '{print $2}')"
134 136
     fi
137
+    if grep -q "XMPP onion domain" $COMPLETION_FILE; then
138
+        echo -n -e "$(pad_string 'XMPP')"
139
+        echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
140
+        echo "$(cat ${COMPLETION_FILE} | grep 'XMPP onion domain' | awk -F ':' '{print $2}')"
141
+    fi
135 142
     if grep -q "Wiki domain" $COMPLETION_FILE; then
136 143
         echo -n -e "$(pad_string 'Wiki')"
137 144
         WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}')
@@ -186,15 +193,6 @@ function show_domains {
186 193
         fi
187 194
         echo ''
188 195
     fi
189
-    if grep -q "XMPP domain" $COMPLETION_FILE; then
190
-        echo -n -e "$(pad_string 'XMPP')"
191
-        XMPPDOM=$(cat ${COMPLETION_FILE} | grep 'XMPP domain' | awk -F ':' '{print $2}')
192
-        echo -n -e "$(pad_string ${XMPPDOM})"
193
-        if [ -d /var/lib/tor/hidden_service_xmpp ]; then
194
-            echo -n "$(cat /var/lib/tor/hidden_service_xmpp/hostname)"
195
-        fi
196
-        echo ''
197
-    fi
198 196
     echo ''
199 197
 }
200 198