Local name, same as the project name

This commit is contained in:
Bob Mottram 2017-06-22 11:55:28 +01:00
parent c6262e7e3e
commit 5b5bc5cff6
7 changed files with 15 additions and 6 deletions

View File

@ -244,7 +244,7 @@ function choose_default_domain_name {
fi
if [[ $ONION_ONLY != "no" ]]; then
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
DEFAULT_DOMAIN_NAME="${LOCAL_NAME}.local"
else
DEFAULT_DOMAIN_DETAILS_COMPLETE=
while [ ! $DEFAULT_DOMAIN_DETAILS_COMPLETE ]

View File

@ -49,6 +49,8 @@ function please_wait {
please_wait
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES
do
@ -410,7 +412,7 @@ function show_domains {
icann_address='-'
fi
if [[ $ONION_ONLY != 'no' ]]; then
if [[ ${icann_address} != ${PROJECT_NAME}.local ]]; then
if [[ ${icann_address} != ${LOCAL_NAME}.local ]]; then
icann_address='-'
fi
fi

View File

@ -93,7 +93,7 @@ NAMESERVER6='4.4.4.4'
# An optional freedombone configuration file
CONFIG_FILENAME=
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
DEFAULT_DOMAIN_NAME="${LOCAL_NAME}.local"
# Minimum number of characters in a password
MINIMUM_PASSWORD_LENGTH=$(cat /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')

View File

@ -351,7 +351,7 @@ function check_domains {
domain_param=$(echo "$d" | awk -F '=' '{print $1}')
if [[ "$domain_param" != "DEFAULT_DOMAIN_NAME" ]]; then
domain_value=$(echo "$d" | awk -F '=' '{print $2}')
if [[ "$domain_value" != "${PROJECT_NAME}.local" ]]; then
if [[ "$domain_value" != "${LOCAL_NAME}.local" ]]; then
item_in_array "${domain_value}" "${checked_domains[@]}"
if [[ $? != 0 ]]; then
# test that this is a valid domain name

View File

@ -161,7 +161,7 @@ function set_default_onion_domains {
HTMLY_DOMAIN_NAME='htmly.local'
GHOST_DOMAIN_NAME='ghost.local'
DOKUWIKI_DOMAIN_NAME='dokuwiki.local'
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
DEFAULT_DOMAIN_NAME="${LOCAL_NAME}.local"
GIT_DOMAIN_NAME='gogs.local'
}

View File

@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -32,6 +32,10 @@ if [ ! $PROJECT_NAME ]; then
PROJECT_NAME='freedombone'
fi
if [ ! $LOCAL_NAME ]; then
LOCAL_NAME=${PROJECT_NAME}
fi
DEFAULT_DOMAIN_NAME=
DEFAULT_DOMAIN_CODE=
MY_USERNAME=

View File

@ -107,4 +107,7 @@ MY_NAME=$DEFAULT_DOMAIN_NAME
# used to select mesh install functions when creating a mesh image
INSTALLING_MESH=
# The .local avahi name
LOCAL_NAME=${PROJECT_NAME}
# NOTE: deliberately there is no "exit 0"