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.

24 lines
573 B

  1. #!/bin/bash
  2. . lib/common
  3. set -e
  4. DOMAIN=$(relation-get domain) || exit 1
  5. URL="$(relation-get url)" || exit 1
  6. PROTO="${URL%%://*}"
  7. nextcloud:config:simple:add overwritehost "$DOMAIN" || {
  8. err "Failed to set ${WHITE}overwritehost${NORMAL} to '$DOMAIN'."
  9. exit 1
  10. }
  11. nextcloud:config:simple:add overwriteprotocol "$PROTO" || {
  12. err "Failed to set ${WHITE}overwriteprotocol${NORMAL} to '$PROTO'."
  13. exit 1
  14. }
  15. occ config:system:set trusted_proxies 0 --value="0.0.0.0/0" || {
  16. err "Failed to set ${WHITE}trusted_proxies ${NORMAL} to '0.0.0.0/0''."
  17. exit 1
  18. }