Fix new environment variable
This commit is contained in:
parent
066262ce96
commit
cc07186ffa
1 changed files with 5 additions and 5 deletions
|
|
@ -60,16 +60,16 @@ function is_valid_domain() {
|
||||||
|
|
||||||
# 'is_valid_domains' is like is_valid_domain, but comma seperated.
|
# 'is_valid_domains' is like is_valid_domain, but comma seperated.
|
||||||
function is_valid_domains() {
|
function is_valid_domains() {
|
||||||
if [ -z "$1" ]; then
|
if [[ ! -z "$1" ]]; then
|
||||||
return 1;
|
return 0;
|
||||||
fi
|
fi
|
||||||
IFS=',' read -ra domains <<< "$1"
|
IFS=',' read -ra domains <<< "$1"
|
||||||
for domain in $domains; do
|
for domain in $domains; do
|
||||||
if ! is_valid_domain "$domain"; then
|
if ! is_valid_domain "$domain"; then
|
||||||
return 0;
|
return 1;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 'is_valid_number' checks if a value is a valid number.
|
# 'is_valid_number' checks if a value is a valid number.
|
||||||
|
|
@ -167,7 +167,7 @@ if ! is_valid_domain "$DEFAULT_DOMAIN"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The 'SELF_EXTRA_DOMAINS' variable must be a valid domain.
|
# The 'SELF_EXTRA_DOMAINS' variable must be a valid domain.
|
||||||
if ! is_valid_domain "$SELF_EXTRA_DOMAINS"; then
|
if ! is_valid_domains "$SELF_EXTRA_DOMAINS"; then
|
||||||
log_error "Variable 'SELF_EXTRA_DOMAINS' does not contain comma-separated domains. ";
|
log_error "Variable 'SELF_EXTRA_DOMAINS' does not contain comma-separated domains. ";
|
||||||
log_info "Please verify that it is set correctly in '.env'. ";
|
log_info "Please verify that it is set correctly in '.env'. ";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue