TT#177550 check: Add code to check the multi-site setup

This off-loads the check to the ngcp-site script, and prints any error
message from it if the script fails.

Only run the check if ngcp-site is present, so that we avoid a
hard-dependency on system-tools.

Change-Id: I640f85383d424980d81a207dee7d586a88422862
(cherry picked from commit ac1744b253)
mr10.5.3
Guillem Jover 4 years ago
parent c4ae823c5e
commit cc16eed64f

@ -90,6 +90,20 @@ check_origin() {
fi
}
check_multi_site() {
log_debug "Checking multi-site support"
if ! command -v ngcp-site >/dev/null; then
log_debug "Skipping check due to missing ngcp-site"
return 0
fi
if ! error=$(ngcp-site 2>&1 >/dev/null); then
log_error "Configuration problem with multi-site setup."
log_error "${error}"
exit 1
fi
}
check_config_encoding() {
log_debug "Checking encoding for $config_files"
for f in $config_files ; do
@ -245,6 +259,8 @@ check_branch
check_origin
check_multi_site
check_configs
if "${VALIDATE_SCHEMA:-false}" || [ "${VALIDATE:-0}" = "1" ] ; then
validate_config

Loading…
Cancel
Save