From e86ace516f516734142dba3240e467ad2df105bb Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 14 Dec 2022 15:58:24 +0100 Subject: [PATCH] Ensure we have an app secret set, also after update --- start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start.sh b/start.sh index 692bbc7..6f3dedf 100755 --- a/start.sh +++ b/start.sh @@ -41,6 +41,11 @@ first_time_setup() { update_config() { echo "==> Ensure and updating configs" + # version 5 needs this now + if [[ `yq eval '.secrets | has("peertube")' /app/data/production.yaml` != "true" ]]; then + yq eval ".secrets.peertube = \"`openssl rand -hex 32`\"" -i /app/data/production.yaml + fi + yq eval ".webserver.hostname = \"${CLOUDRON_APP_DOMAIN}\"" -i /app/data/production.yaml # database