Browse Source

Onion domain names within the completion file

Bob Mottram 8 years ago
parent
commit
d37b69bf50

+ 0
- 1
src/freedombone-app-blog View File

@@ -668,7 +668,6 @@ function install_blog {
668 668
         chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
669 669
         chmod 600 /home/$MY_USERNAME/README
670 670
     fi
671
-    echo "Blog onion domain:${FULLBLOG_ONION_HOSTNAME}" >> $COMPLETION_FILE
672 671
 
673 672
     function_check add_ddns_domain
674 673
     add_ddns_domain $FULLBLOG_DOMAIN_NAME

+ 0
- 6
src/freedombone-app-gnusocial View File

@@ -638,12 +638,6 @@ function install_gnusocial_main {
638 638
         fi
639 639
     fi
640 640
 
641
-    if ! grep -q "GNU Social onion domain" $COMPLETION_FILE; then
642
-        echo "GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}" >> $COMPLETION_FILE
643
-    else
644
-        sed -i "s|GNU Social onion domain.*|GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}|g" $COMPLETION_FILE
645
-    fi
646
-
647 641
     if ! grep -q "GNU Social domain" $COMPLETION_FILE; then
648 642
         echo "GNU Social domain:$MICROBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
649 643
     else

+ 5
- 2
src/freedombone-app-gogs View File

@@ -674,8 +674,11 @@ function install_gogs {
674 674
         chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
675 675
         chmod 600 /home/$MY_USERNAME/README
676 676
     fi
677
-    if ! grep -q "Gogs onion domain" $COMPLETION_FILE; then
678
-        echo "Gogs onion domain:${GIT_ONION_HOSTNAME}" >> $COMPLETION_FILE
677
+
678
+    if ! grep -q "gogs onion domain" $COMPLETION_FILE; then
679
+        echo "gogs onion domain:${GIT_ONION_HOSTNAME}" >> $COMPLETION_FILE
680
+    else
681
+        sed -i "s|gogs onion domain.*|gogs onion domain:${GIT_ONION_HOSTNAME}|g" $COMPLETION_FILE
679 682
     fi
680 683
 
681 684
     function_check add_ddns_domain

+ 0
- 1
src/freedombone-app-hubzilla View File

@@ -459,7 +459,6 @@ function install_hubzilla {
459 459
     HUBZILLA_ONION_HOSTNAME=
460 460
     if [[ $ONION_ONLY != "no" ]]; then
461 461
         HUBZILLA_ONION_HOSTNAME=$(add_onion_service hubzilla 80 ${HUBZILLA_ONION_PORT})
462
-        echo "Hubzilla onion domain:${HUBZILLA_ONION_HOSTNAME}" >> $COMPLETION_FILE
463 462
     fi
464 463
 
465 464
     hubzilla_create_database

+ 1
- 4
src/freedombone-app-irc View File

@@ -260,9 +260,6 @@ function install_irc_server {
260 260
     chown -R irc:irc /var/run/ngircd
261 261
 
262 262
     IRC_ONION_HOSTNAME=$(add_onion_service irc ${IRC_PORT} ${IRC_ONION_PORT})
263
-    if ! grep -q $"IRC onion domain" $COMPLETION_FILE; then
264
-        echo "IRC onion domain:$IRC_ONION_HOSTNAME" >> $COMPLETION_FILE
265
-    fi
266 263
 
267 264
     systemctl restart ngircd
268 265
 
@@ -331,7 +328,7 @@ function install_irc_client {
331 328
         echo "    port = \"${IRC_PORT}\";" >> /home/$MY_USERNAME/.irssi/config
332 329
         echo '    use_ssl = "yes";' >> /home/$MY_USERNAME/.irssi/config
333 330
     else
334
-        IRC_ONION_HOSTNAME=$(cat $COMPLETION_FILE | grep "IRC onion domain" | awk -F ':' '{print $2}')
331
+        IRC_ONION_HOSTNAME=$(cat $COMPLETION_FILE | grep "irc onion domain" | awk -F ':' '{print $2}')
335 332
         echo "    port = \"${IRC_ONION_PORT}\";" >> /home/$MY_USERNAME/.irssi/config
336 333
         echo '    use_ssl = "no";' >> /home/$MY_USERNAME/.irssi/config
337 334
     fi

+ 0
- 5
src/freedombone-app-mediagoblin View File

@@ -359,11 +359,6 @@ function install_mediagoblin {
359 359
     systemctl start mediagoblin-paster
360 360
 
361 361
     MEDIAGOBLIN_ONION_HOSTNAME=$(add_onion_service mediagoblin 80 ${MEDIAGOBLIN_ONION_PORT})
362
-    if ! grep -q "Mediagoblin onion domain" $COMPLETION_FILE; then
363
-        echo "Mediagoblin onion domain:${MEDIAGOBLIN_ONION_HOSTNAME}" >> $COMPLETION_FILE
364
-    else
365
-        sed -i "s|Mediagoblin onion domain.*|Mediagoblin onion domain:${MEDIAGOBLIN_ONION_HOSTNAME}|g" $COMPLETION_FILE
366
-    fi
367 362
     if [[ $MEDIAGOBLIN_ONION_HOSTNAME == *"not found"* ]]; then
368 363
         echo $'Problem creating onion address for mediagoblin'
369 364
         exit 672652

+ 1
- 4
src/freedombone-app-mumble View File

@@ -267,10 +267,7 @@ function install_mumble {
267 267
     sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini
268 268
     sed -i "s|port=.*|port=${VOIP_PORT}|g" /etc/mumble-server.ini
269 269
 
270
-    VOIP_ONION_HOSTNAME=$(add_onion_service voip ${VOIP_PORT} ${VOIP_PORT})
271
-    if ! grep -q $"VoIP onion domain" $COMPLETION_FILE; then
272
-        echo "VoIP onion domain:$VOIP_ONION_HOSTNAME" >> $COMPLETION_FILE
273
-    fi
270
+    VOIP_ONION_HOSTNAME=$(add_onion_service mumble ${VOIP_PORT} ${VOIP_PORT})
274 271
 
275 272
     systemctl restart mumble-server
276 273
 

+ 2
- 9
src/freedombone-app-rss View File

@@ -326,8 +326,8 @@ function install_rss_main {
326 326
 
327 327
     rss_create_database
328 328
 
329
-    RSS_READER_ONION_HOSTNAME=$(add_onion_service ttrss 80 ${RSS_READER_ONION_PORT})
330
-    RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service ttrss 80 ${RSS_MOBILE_READER_ONION_PORT})
329
+    RSS_READER_ONION_HOSTNAME=$(add_onion_service rss 80 ${RSS_READER_ONION_PORT})
330
+    RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service rss_mobile 80 ${RSS_MOBILE_READER_ONION_PORT})
331 331
 
332 332
     echo 'server {' > /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
333 333
     echo "  listen 127.0.0.1:$RSS_MOBILE_READER_ONION_PORT;" >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
@@ -489,13 +489,6 @@ function install_rss_main {
489 489
     systemctl restart php5-fpm
490 490
     systemctl restart nginx
491 491
 
492
-    if ! grep -q "RSS reader onion domain" $COMPLETION_FILE; then
493
-        echo "RSS reader onion domain:${RSS_READER_ONION_HOSTNAME}" >> $COMPLETION_FILE
494
-    fi
495
-    if ! grep -q "RSS reader domain" $COMPLETION_FILE; then
496
-        echo "RSS reader domain:${RSS_READER_DOMAIN_NAME}" >> $COMPLETION_FILE
497
-    fi
498
-
499 492
     # daemon to update feeds
500 493
     echo '[Unit]' > /etc/systemd/system/ttrss.service
501 494
     echo 'Description=ttrss_backend' >> /etc/systemd/system/ttrss.service

+ 0
- 5
src/freedombone-app-searx View File

@@ -178,11 +178,6 @@ function install_searx {
178 178
 
179 179
     # create an onion service
180 180
     SEARX_ONION_HOSTNAME=$(add_onion_service searx 80 ${SEARX_ONION_PORT})
181
-    if ! grep "Search engine onion domain" $COMPLETION_FILE; then
182
-        echo "Search engine onion domain:${SEARX_ONION_HOSTNAME}" >> $COMPLETION_FILE
183
-    else
184
-        sed -i "s|Search engine onion domain.*|Search engine onion domain:${SEARX_ONION_HOSTNAME}|g" $COMPLETION_FILE
185
-    fi
186 181
 
187 182
     # an unprivileged user to run as
188 183
     useradd -d ${SEARX_PATH}/searx/ -s /bin/false searx

+ 0
- 3
src/freedombone-app-sip View File

@@ -285,9 +285,6 @@ function install_sip_main {
285 285
     usermod -aG sipwitch $MY_USERNAME
286 286
 
287 287
     SIP_ONION_HOSTNAME=$(add_onion_service sip ${SIP_PORT} ${SIP_PORT})
288
-    if ! grep -q $"SIP onion domain" $COMPLETION_FILE; then
289
-        echo "SIP onion domain:$SIP_ONION_HOSTNAME" >> $COMPLETION_FILE
290
-    fi
291 288
 
292 289
     if ! grep -q $"SIP Server" /home/$MY_USERNAME/README; then
293 290
         echo '' >> /home/$MY_USERNAME/README

+ 0
- 6
src/freedombone-app-tox View File

@@ -326,12 +326,6 @@ function install_tox_node {
326 326
     # onion address for bootstrapping
327 327
     TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT})
328 328
 
329
-    if ! grep -q "tox onion domain" $COMPLETION_FILE; then
330
-        echo "tox onion domain:${TOX_ONION_HOSTNAME}" >> $COMPLETION_FILE
331
-    else
332
-        sed -i "s|tox onion domain.*|tox onion domain:${TOX_ONION_HOSTNAME}|g" $COMPLETION_FILE
333
-    fi
334
-
335 329
     systemctl restart tox-bootstrapd.service
336 330
 
337 331
     TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)

+ 0
- 1
src/freedombone-app-webmail View File

@@ -177,7 +177,6 @@ function install_webmail {
177 177
     fi
178 178
 
179 179
     WEBMAIL_ONION_HOSTNAME=$(add_onion_service webmail 80 ${WEBMAIL_ONION_PORT})
180
-    echo "Webmail onion domain:${WEBMAIL_ONION_HOSTNAME}" >> $COMPLETION_FILE
181 180
 
182 181
     webmail_create_database
183 182
 

+ 0
- 2
src/freedombone-app-wiki View File

@@ -635,8 +635,6 @@ function install_wiki {
635 635
     systemctl restart php5-fpm
636 636
     systemctl restart nginx
637 637
 
638
-    echo "Wiki onion domain:${WIKI_ONION_HOSTNAME}" >> $COMPLETION_FILE
639
-
640 638
     function_check add_ddns_domain
641 639
     add_ddns_domain $WIKI_DOMAIN_NAME
642 640
 

+ 3
- 3
src/freedombone-app-xmpp View File

@@ -399,10 +399,10 @@ function install_xmpp_main {
399 399
         echo "VirtualHost \"${XMPP_ONION_HOSTNAME}\"" >> /etc/prosody/conf.avail/xmpp.cfg.lua
400 400
         echo '    modules_enabled = { "onions" };' >> /etc/prosody/conf.avail/xmpp.cfg.lua
401 401
     fi
402
-    if ! grep -q "XMPP onion domain" $COMPLETION_FILE; then
403
-        echo "XMPP onion domain:${XMPP_ONION_HOSTNAME}" >> $COMPLETION_FILE
402
+    if ! grep -q "xmpp onion domain" $COMPLETION_FILE; then
403
+        echo "xmpp onion domain:${XMPP_ONION_HOSTNAME}" >> $COMPLETION_FILE
404 404
     else
405
-        sed -i "s|XMPP onion domain.*|XMPP onion domain:${XMPP_ONION_HOSTNAME}|g" $COMPLETION_FILE
405
+        sed -i "s|xmpp onion domain.*|xmpp onion domain:${XMPP_ONION_HOSTNAME}|g" $COMPLETION_FILE
406 406
     fi
407 407
 
408 408
     if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then