Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
e4bb8383
Commit
e4bb8383
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidying
parent
a15ec75a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-utils-config
+21
-116
21 additions, 116 deletions
src/freedombone-utils-config
with
21 additions
and
116 deletions
src/freedombone-utils-config
+
21
−
116
View file @
e4bb8383
...
...
@@ -181,125 +181,30 @@ function check_system_type {
echo
"System type:
$SYSTEM_TYPE
"
}
# check that domain names are
sensible
# check that domain names are
valid and that they are unique for each app
function
check_domains
{
if
[
${#
WIKI_DOMAIN_NAME
}
-gt
1
]
;
then
function_check test_domain_name
test_domain_name
"
$WIKI_DOMAIN_NAME
"
if
[[
"
$test_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
[[
"
$test_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
[[
"
$test_domain_name
"
==
"
$HUBZILLA_DOMAIN_NAME
"
]]
;
then
echo
$'Wiki domain name is the same as hubzilla domain name. They must be different'
exit
65848
fi
if
[
${#
GIT_DOMAIN_NAME
}
-gt
1
]
;
then
if
[[
"
$test_domain_name
"
==
"
$GIT_DOMAIN_NAME
"
]]
;
then
echo
$'Wiki domain name is the same as Gogs domain name. They must be different'
exit
73529
fi
fi
fi
if
[
${#
FULLBLOG_DOMAIN_NAME
}
-gt
1
]
;
then
function_check test_domain_name
test_domain_name
"
$FULLBLOG_DOMAIN_NAME
"
if
[[
"
$test_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
[[
"
$test_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
[[
"
$test_domain_name
"
==
"
$HUBZILLA_DOMAIN_NAME
"
]]
;
then
echo
$'Blog domain name is the same as hubzilla domain name. They must be different'
exit
35483
fi
if
[
$GIT_DOMAIN_NAME
]
;
then
if
[[
"
$test_domain_name
"
==
"
$GIT_DOMAIN_NAME
"
]]
;
then
echo
$'Blog domain name is the same as Gogs domain name. They must be different'
exit
84695
fi
fi
fi
if
[
${#
MICROBLOG_DOMAIN_NAME
}
-gt
1
]
;
then
function_check test_domain_name
test_domain_name
"
$MICROBLOG_DOMAIN_NAME
"
if
[[
"
$test_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
[[
"
$test_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
[[
"
$test_domain_name
"
==
"
$HUBZILLA_DOMAIN_NAME
"
]]
;
then
echo
$'Microblog domain name is the same as hubzilla domain name. They must be different'
exit
678382
fi
if
[
$GIT_DOMAIN_NAME
]
;
then
if
[[
"
$test_domain_name
"
==
"
$GIT_DOMAIN_NAME
"
]]
;
then
echo
$'Microblog domain name is the same as Gogs domain name. They must be different'
exit
684325
fi
fi
fi
if
[
$HUBZILLA_DOMAIN_NAME
]
;
then
function_check test_domain_name
test_domain_name
"
$HUBZILLA_DOMAIN_NAME
"
if
[[
"
$test_domain_name
"
==
"
$WIKI_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as wiki domain name. They must be different'
exit
83682
fi
if
[[
"
$test_domain_name
"
==
"
$FULLBLOG_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as blog domain name. They must be different'
exit
74817
fi
if
[[
"
$test_domain_name
"
==
"
$MICROBLOG_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as microblog domain name. They must be different'
exit
83683
fi
if
[
${#
GIT_DOMAIN_NAME
}
-gt
1
]
;
then
if
[[
"
$test_domain_name
"
==
"
$GIT_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as Gogs domain name. They must be different'
exit
135523
specified_domains
=
$(
cat
$CONFIGURATION_FILE
|
grep
"_DOMAIN_NAME"
|
uniq
)
domains_array
=(
$specified_domains
)
checked_domains
=()
for
d
in
"
${
domains_array
[@]
}
"
do
domain_param
=
$(
echo
"
$d
"
|
awk
-F
'='
'{print $1}'
)
if
[[
$domain_param
!=
"DEFAULT_DOMAIN_NAME"
]]
;
then
domain_value
=
$(
echo
"
$d
"
|
awk
-F
'='
'{print $2}'
)
item_in_array
"
${
domain_value
}
"
"
${
checked_domains
[@]
}
"
if
[[
$?
!=
0
]]
;
then
# test that this is a valid domain name
function_check test_domain_name
test_domain_name
"
$domain_value
"
# add it to the list of domains
checked_domains+
=(
"
$domain_value
"
)
else
echo
$"Domain
${
domain_value
}
collides with another app. The domain for each app should be unique."
exit
673925
fi
fi
fi
if
[
${#
GIT_DOMAIN_NAME
}
-gt
1
]
;
then
function_check test_domain_name
test_domain_name
"
$GIT_DOMAIN_NAME
"
if
[[
"
$test_domain_name
"
==
"
$WIKI_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as wiki domain name. They must be different'
exit
83682
fi
if
[[
"
$test_domain_name
"
==
"
$FULLBLOG_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as blog domain name. They must be different'
exit
74817
fi
if
[[
"
$test_domain_name
"
==
"
$MICROBLOG_DOMAIN_NAME
"
]]
;
then
echo
$'Hubzilla domain name is the same as microblog domain name. They must be different'
exit
83683
fi
if
[[
"
$test_domain_name
"
==
"
$HUBZILLA_DOMAIN_NAME
"
]]
;
then
echo
$'Microblog domain name is the same as hubzilla domain name. They must be different'
exit
678382
fi
fi
done
}
# NOTE: deliberately no exit 0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment