From db5ac4297bf1d3f06db194545ba45b717c77096a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 12 Nov 2017 17:54:43 +0000 Subject: [PATCH] Fix images on pleroma --- src/freedombone-app-pleroma | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 29239a56..03bdfe52 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -868,6 +868,19 @@ function install_pleroma { set_completion_param "pleroma domain" "$PLEROMA_DOMAIN_NAME" + # We need to set up the url option again because it somehow gets + # lost during mix compile + pleroma_secret=$PLEROMA_DIR/config/dev.secret.exs + if ! grep -q 'watchers: [],' $pleroma_secret; then + sed -i 's|watchers: []|watchers: [],|g' $pleroma_secret + fi + if ! grep -q 'url:' $pleroma_secret; then + if [[ $ONION_ONLY == 'no' ]]; then + sed -i "/watchers: []/a url: [host: \"$PLEROMA_DOMAIN_NAME\", scheme: \"https\", port: 443]" $pleroma_secret + else + sed -i "/watchers: []/a url: [host: \"$PLEROMA_ONION_HOSTNAME\", scheme: \"http\", port: 80]" $pleroma_secret + fi + fi # daemon echo '[Unit]' > /etc/systemd/system/pleroma.service