Check that no two domains are the same

This commit is contained in:
Bob Mottram 2015-01-29 14:58:21 +00:00
parent e4de79aa9d
commit a6c483c7a4
1 changed files with 104 additions and 5 deletions

View File

@ -1239,11 +1239,110 @@ function test_domain_name {
# 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
if [ $WIKI_DOMAIN_NAME ]; then
test_domain_name "$WIKI_DOMAIN_NAME"
if [[ "$WIKI_DOMAIN_NAME" == "$OWNCLOUD_DOMAIN_NAME" ]]; then
echo 'Wiki domain name is the same as Owncloud domain name. They must be different'
exit 73863
fi
if [[ "$WIKI_DOMAIN_NAME" == "$FULLBLOG_DOMAIN_NAME" ]]; then
echo 'Wiki domain name is the same as blog domain name. They must be different'
exit 97326
fi
if [[ "$WIKI_DOMAIN_NAME" == "$MICROBLOG_DOMAIN_NAME" ]]; then
echo 'Wiki domain name is the same as microblog domain name. They must be different'
exit 36827
fi
if [[ "$WIKI_DOMAIN_NAME" == "$REDMATRIX_DOMAIN_NAME" ]]; then
echo 'Wiki domain name is the same as redmatrix domain name. They must be different'
exit 93637
fi
fi
if [ $OWNCLOUD_DOMAIN_NAME ]; then
test_domain_name "$OWNCLOUD_DOMAIN_NAME"
if [[ "$OWNCLOUD_DOMAIN_NAME" == "$WIKI_DOMAIN_NAME" ]]; then
echo 'Owncloud domain name is the same as wiki domain name. They must be different'
exit 37994
fi
if [[ "$OWNCLOUD_DOMAIN_NAME" == "$FULLBLOG_DOMAIN_NAME" ]]; then
echo 'Owncloud domain name is the same as blog domain name. They must be different'
exit 37936
fi
if [[ "$OWNCLOUD_DOMAIN_NAME" == "$MICROBLOG_DOMAIN_NAME" ]]; then
echo 'Owncloud domain name is the same as microblog domain name. They must be different'
exit 36896
fi
if [[ "$OWNCLOUD_DOMAIN_NAME" == "$REDMATRIX_DOMAIN_NAME" ]]; then
echo 'Owncloud domain name is the same as redmatrix domain name. They must be different'
exit 79362
fi
fi
if [ $FULLBLOG_DOMAIN_NAME ]; then
test_domain_name "$FULLBLOG_DOMAIN_NAME"
if [[ "$FULLBLOG_DOMAIN_NAME" == "$WIKI_DOMAIN_NAME" ]]; then
echo 'Blog domain name is the same as wiki domain name. They must be different'
exit 62348
fi
if [[ "$FULLBLOG_DOMAIN_NAME" == "$OWNCLOUD_DOMAIN_NAME" ]]; then
echo 'Blog domain name is the same as Owncloud domain name. They must be different'
exit 84682
fi
if [[ "$FULLBLOG_DOMAIN_NAME" == "$MICROBLOG_DOMAIN_NAME" ]]; then
echo 'Blog domain name is the same as microblog domain name. They must be different'
exit 38236
fi
if [[ "$FULLBLOG_DOMAIN_NAME" == "$REDMATRIX_DOMAIN_NAME" ]]; then
echo 'Blog domain name is the same as redmatrix domain name. They must be different'
exit 36813
fi
fi
if [ $MICROBLOG_DOMAIN_NAME ]; then
test_domain_name "$MICROBLOG_DOMAIN_NAME"
if [[ "$MICROBLOG_DOMAIN_NAME" == "$WIKI_DOMAIN_NAME" ]]; then
echo 'Microblog domain name is the same as wiki domain name. They must be different'
exit 73924
fi
if [[ "$MICROBLOG_DOMAIN_NAME" == "$OWNCLOUD_DOMAIN_NAME" ]]; then
echo 'Microblog domain name is the same as Owncloud domain name. They must be different'
exit 73683
fi
if [[ "$MICROBLOG_DOMAIN_NAME" == "$FULLBLOG_DOMAIN_NAME" ]]; then
echo 'Microblog domain name is the same as blog domain name. They must be different'
exit 26832
fi
if [[ "$MICROBLOG_DOMAIN_NAME" == "$REDMATRIX_DOMAIN_NAME" ]]; then
echo 'Microblog domain name is the same as redmatrix domain name. They must be different'
exit 36373
fi
fi
if [ $REDMATRIX_DOMAIN_NAME ]; then
test_domain_name "$REDMATRIX_DOMAIN_NAME"
if [[ "$REDMATRIX_DOMAIN_NAME" == "$WIKI_DOMAIN_NAME" ]]; then
echo 'RedMatrix domain name is the same as wiki domain name. They must be different'
exit 83682
fi
if [[ "$REDMATRIX_DOMAIN_NAME" == "$OWNCLOUD_DOMAIN_NAME" ]]; then
echo 'RedMatrix domain name is the same as Owncloud domain name. They must be different'
exit 65192
fi
if [[ "$REDMATRIX_DOMAIN_NAME" == "$FULLBLOG_DOMAIN_NAME" ]]; then
echo 'RedMatrix domain name is the same as blog domain name. They must be different'
exit 74817
fi
if [[ "$REDMATRIX_DOMAIN_NAME" == "$MICROBLOG_DOMAIN_NAME" ]]; then
echo 'RedMatrix domain name is the same as microblog domain name. They must be different'
exit 83683
fi
fi
}
# Checks whether certificates were generated for the given hostname