16 lines
339 B

  1. #!/bin/bash
  2. set -e
  3. . lib/common
  4. server_name=$(options-get "server_name") || true
  5. if [ -z "$server_name" ]; then
  6. DOMAIN=$(relation-get domain) || exit 1
  7. cfg-merge "server_name: $DOMAIN"
  8. fi
  9. URL=$(relation-get url) || exit 1
  10. cfg-merge "public_baseurl: $URL"
  11. sed -ri 's/^(\s+x_forwarded:\s+)[fF]alse/\1true/g' "$HOST_CONFIG_FILE"