You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
927 B

#!/bin/bash
set -e
DOMAIN=$(relation-get domain) || exit 1
URL="$(relation-get url)" || exit 1
PROTO="${URL%%://*}"
occ_opts=(
## necessary as nextcloud do not detect correctly those, and behind
## a proxy, it will generate a lot of URL that are not detected
## by means of ``ReverseProxyPass`` on apache for instance
config:system:set overwritehost --value="$DOMAIN" \;
config:system:set overwriteprotocol --value="$PROTO"
)
compose --no-relations --no-init occ "$MASTER_BASE_SERVICE_NAME" "${occ_opts[@]}" || {
err "Failure to execute these ${WHITE}occ${NORMAL} commands:"
echo " ${WHITE}$(printf ' %q' "${occ_opts[@]}")${NORMAL}" |
sed -r "s/\\;/$'n'/g" | prefix " ${DARKGRAY}>${NORMAL} " >&2
echo " "
echo " If the code of nextcloud is already there (command occ is found), but " >&2
echo " the database is not yet created, this situation will arise." >&2
exit 1
}