diff --git a/snap/hooks/configure b/snap/hooks/configure index ccbb2a58..21869aa2 100644 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -16,4 +16,10 @@ then with 'snap restart conduit'" fi +federation_enabled=$(snapctl get federation) +if [ -n ${federation_enabled} -a \( "${federation_enabled}" != "true" -a "${federation_enabled}" != "false" \) ] +then + echo "Invalid 'federation' setting: ${federation_enabled}. Valid values are 'true' or 'false'" +fi + exit 0 diff --git a/snap/local/set-environment b/snap/local/set-environment index 79a8f95b..b65aee00 100755 --- a/snap/local/set-environment +++ b/snap/local/set-environment @@ -16,6 +16,12 @@ then export ROCKET_PORT="$(snapctl get listen.port)" fi +federation_enabled="$(snapctl get federation)" +if [ -n "${federation_enabled}" ] +then + export ROCKET_FEDERATION_ENABLED=${federation_enabled} +fi + export ROCKET_ENV="production" export ROCKET_DATABASE_PATH=${SNAP_DATA}