In onion only mode we don't need dynamic dns

This commit is contained in:
Bob Mottram 2015-12-30 19:04:10 +00:00
parent f75bb0e167
commit 5101d63653
1 changed files with 38 additions and 0 deletions

View File

@ -1216,6 +1216,33 @@ function read_configuration {
fi fi
} }
function set_default_onion_domains {
# If sites are only visible via Tor then for installation
# purposes assign them some default domain names
if [[ $ONION_ONLY == "no" ]]; then
return
fi
if [ $OWNCLOUD_DOMAIN_NAME ]; then
OWNCLOUD_DOMAIN_NAME='owncloud.onion'
fi
if [ $MICROBLOG_DOMAIN_NAME ]; then
MICROBLOG_DOMAIN_NAME='microblog.onion'
fi
if [ $FULLBLOG_DOMAIN_NAME ]; then
FULLBLOG_DOMAIN_NAME='blog.onion'
fi
if [ $GIT_DOMAIN_NAME ]; then
GIT_DOMAIN_NAME='git.onion'
fi
if [ $WIKI_DOMAIN_NAME ]; then
WIKI_DOMAIN_NAME='wiki.onion'
fi
if [ $DEFAULT_DOMAIN_NAME ]; then
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.onion"
fi
}
# check an individual domain name # check an individual domain name
function test_domain_name { function test_domain_name {
if [ $1 ]; then if [ $1 ]; then
@ -2939,6 +2966,10 @@ function get_mariadb_owncloud_admin_password {
} }
function create_freedns_updater { function create_freedns_updater {
if [[ $ONION_ONLY != "no" ]]; then
return
fi
# currently inadyn doesn't work as expected with freeDNS, so this is a workaround # currently inadyn doesn't work as expected with freeDNS, so this is a workaround
if grep -Fxq "create_freedns_updater" $COMPLETION_FILE; then if grep -Fxq "create_freedns_updater" $COMPLETION_FILE; then
return return
@ -5628,6 +5659,9 @@ function install_owncloud_music_app {
} }
function add_ddns_domain { function add_ddns_domain {
if [[ $ONION_ONLY != "no" ]]; then
return
fi
if [ ! $CURRENT_DDNS_DOMAIN ]; then if [ ! $CURRENT_DDNS_DOMAIN ]; then
echo $'ddns domain not specified' echo $'ddns domain not specified'
exit 5638 exit 5638
@ -8864,6 +8898,9 @@ function install_dynamicdns {
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return return
fi fi
if [[ $ONION_ONLY != "no" ]]; then
return
fi
# update to the next commit # update to the next commit
if [ -d $INSTALL_DIR/inadyn ]; then if [ -d $INSTALL_DIR/inadyn ]; then
@ -9340,6 +9377,7 @@ function install_final {
read_configuration read_configuration
set_default_onion_domains
locale_setup locale_setup
parse_args parse_args
check_domains check_domains