#!/bin/sh
# Refuse to start Galene until the public URL has been configured.
config=/etc/galene/config.json

if ! grep -q '"proxyURL"' "$config"; then
    echo "$config: proxyURL is not set; set it to the public URL of the reverse proxy" >&2
    exit 1
fi
if grep -q '"proxyURL"[[:space:]]*:[[:space:]]*"https://galene\.example\.org/"' "$config"; then
    echo "$config: proxyURL is still the example value; set it to the public URL of the reverse proxy" >&2
    exit 1
fi
