Onion domain names within the completion file

This commit is contained in:
Bob Mottram 2016-10-01 15:35:27 +01:00
parent ff95d79d26
commit d37b69bf50
14 changed files with 12 additions and 52 deletions

View File

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

View File

@ -638,12 +638,6 @@ function install_gnusocial_main {
fi
fi
if ! grep -q "GNU Social onion domain" $COMPLETION_FILE; then
echo "GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}" >> $COMPLETION_FILE
else
sed -i "s|GNU Social onion domain.*|GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}|g" $COMPLETION_FILE
fi
if ! grep -q "GNU Social domain" $COMPLETION_FILE; then
echo "GNU Social domain:$MICROBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
else

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -326,8 +326,8 @@ function install_rss_main {
rss_create_database
RSS_READER_ONION_HOSTNAME=$(add_onion_service ttrss 80 ${RSS_READER_ONION_PORT})
RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service ttrss 80 ${RSS_MOBILE_READER_ONION_PORT})
RSS_READER_ONION_HOSTNAME=$(add_onion_service rss 80 ${RSS_READER_ONION_PORT})
RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service rss_mobile 80 ${RSS_MOBILE_READER_ONION_PORT})
echo 'server {' > /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
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 {
systemctl restart php5-fpm
systemctl restart nginx
if ! grep -q "RSS reader onion domain" $COMPLETION_FILE; then
echo "RSS reader onion domain:${RSS_READER_ONION_HOSTNAME}" >> $COMPLETION_FILE
fi
if ! grep -q "RSS reader domain" $COMPLETION_FILE; then
echo "RSS reader domain:${RSS_READER_DOMAIN_NAME}" >> $COMPLETION_FILE
fi
# daemon to update feeds
echo '[Unit]' > /etc/systemd/system/ttrss.service
echo 'Description=ttrss_backend' >> /etc/systemd/system/ttrss.service

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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