update_prefix_config: Use https when enabled
This commit updates the 'update_prefix_config.sh' script to use an 'https://' as opposed to an 'http://' url when support is enabled.
This commit is contained in:
parent
5170cc5dda
commit
1d1f61e6b4
2 changed files with 11 additions and 1 deletions
|
|
@ -43,6 +43,16 @@ function compute_instance_domain() {
|
||||||
}
|
}
|
||||||
INSTANCE_DOMAIN="$(compute_instance_domain "$SLUG")"
|
INSTANCE_DOMAIN="$(compute_instance_domain "$SLUG")"
|
||||||
|
|
||||||
|
# compute the url pointing to an instance
|
||||||
|
function compute_instance_url() {
|
||||||
|
if [ -n "$CERTBOT_EMAIL" ]; then
|
||||||
|
echo -n "https://"
|
||||||
|
else
|
||||||
|
echo "http://"
|
||||||
|
fi
|
||||||
|
compute_instance_domain "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# Next we need a username base.
|
# Next we need a username base.
|
||||||
# This will be used as a username across the system (linux), MySQL and GraphDB.
|
# This will be used as a username across the system (linux), MySQL and GraphDB.
|
||||||
# For this we can only allow [0-9a-zA-Z-], hence we have to escape.
|
# For this we can only allow [0-9a-zA-Z-], hence we have to escape.
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ date | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||||
|
|
||||||
# update all the instances
|
# update all the instances
|
||||||
for slug in $(sql_bookkeep_list); do
|
for slug in $(sql_bookkeep_list); do
|
||||||
INSTANCE_DOMAIN="http://$(compute_instance_domain "$slug")"
|
INSTANCE_DOMAIN="$(compute_instance_url "$slug")"
|
||||||
echo "$INSTANCE_DOMAIN:" | tee -a "$DEPLOY_PREFIX_CONFIG"
|
echo "$INSTANCE_DOMAIN:" | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||||
|
|
||||||
read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER GRAPHDB_PASSWORD <<< "$(sql_bookkeep_load "${slug}" "filesystem_base,sql_database,sql_user,graphdb_repository,graphdb_user,graphdb_password" | tail -n +2)"
|
read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER GRAPHDB_PASSWORD <<< "$(sql_bookkeep_load "${slug}" "filesystem_base,sql_database,sql_user,graphdb_repository,graphdb_user,graphdb_password" | tail -n +2)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue