Make 'TARGET' configurable
This commit makes the TARGET of the self container redirect configurable.
This commit is contained in:
parent
2dfed350e0
commit
65a42f61e9
4 changed files with 29 additions and 1 deletions
|
|
@ -76,6 +76,15 @@ function is_valid_email() {
|
|||
fi
|
||||
}
|
||||
|
||||
# 'is_valid_https_url' checks if a value is a valid url that starts with https
|
||||
function is_valid_https_url() {
|
||||
if [[ "$1" =~ ^https:// ]]; then
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
}
|
||||
|
||||
# The 'DEPLOY_ROOT' variable must be an absolute path.
|
||||
if ! is_valid_abspath "$DEPLOY_ROOT"; then
|
||||
log_error "Variable 'DEPLOY_ROOT' is missing or not a valid path. ";
|
||||
|
|
@ -150,6 +159,18 @@ if ! is_valid_number "$PASSWORD_LENGTH"; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
# The 'CERTBOT_EMAIL' variable should either be empty or a valid email
|
||||
if [ -n "$SELF_REDIRECT" ]; then
|
||||
if ! is_valid_https_url "$SELF_REDIRECT"; then
|
||||
log_error "Variable 'SELF_REDIRECT' is not a valid url. ";
|
||||
log_info "It should start with https://"
|
||||
log_info "Please verify that it is set correctly in '.env' or remove it completly. ";
|
||||
exit 1;
|
||||
fi;
|
||||
else
|
||||
SELF_REDIRECT="https://gitlab.cs.fau.de/AGFD/wisski-distillery"
|
||||
fi
|
||||
|
||||
# paths to composer things
|
||||
DEPLOY_WEB_DIR="$DEPLOY_ROOT/core/web"
|
||||
DEPLOY_SELF_DIR="$DEPLOY_ROOT/core/self"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue