Domain checking for non-interactive installs

This commit is contained in:
Bob Mottram 2015-01-29 14:39:15 +00:00
parent 111aecce73
commit e4de79aa9d
1 changed files with 22 additions and 0 deletions

View File

@ -1225,6 +1225,27 @@ function read_configuration {
fi
}
# check an individual domain name
function test_domain_name {
if [ $1 ]; then
TEST_DOMAIN_NAME=$1
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $1 ]]; then
echo $TEST_DOMAIN_NAME
exit 8528
fi
fi
}
# check that domain names are sensible
function check_domains {
test_domain_name $WIKI_DOMAIN_NAME
test_domain_name $OWNCLOUD_DOMAIN_NAME
test_domain_name $FULLBLOG_DOMAIN_NAME
test_domain_name $MICROBLOG_DOMAIN_NAME
test_domain_name $REDMATRIX_DOMAIN_NAME
}
# Checks whether certificates were generated for the given hostname
function check_certificates {
if [ ! $1 ]; then
@ -8697,6 +8718,7 @@ function install_final {
read_configuration
parse_args
check_domains
install_not_on_BBB
remove_default_user
configure_firewall