From 8255c8f3ef2dc4f26768c6d9dbfdd02a8cdeb428 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Thu, 5 Nov 2020 17:09:01 +1100 Subject: [PATCH] snap: Add federation configuration option --- snap/hooks/configure | 6 ++++++ snap/local/set-environment | 6 ++++++ 2 files changed, 12 insertions(+) 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}