diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 1b04c883..31db299f 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -232,7 +232,11 @@ function pleroma_create_database { sed -i "/Pleroma.Web.Endpoint/a pubsub: [name: Pleroma.Web.PubSub, adapter: Phoenix.PubSub.PG2]," $pleroma_secret sed -i 's|pubsub: | pubsub: |g' $pleroma_secret sed -i 's|watchers: []|watchers: [],|g' $pleroma_secret - sed -i "/watchers: []/a url: [host: \"$PLEROMA_DOMAIN_NAME\", scheme: \"https\", port: 443]" $pleroma_secret + 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 sed -i 's|url: | url: |g' $pleroma_secret if ! grep -q "pbkdf2_rounds" $pleroma_secret; then sed -i '/config :logger/a config :comeonin, :pbkdf2_rounds, 1' $pleroma_secret @@ -455,6 +459,7 @@ function restore_local_pleroma { temp_restore_dir=/root/temppleroma pleroma_dir=$PLEROMA_DIR + PLEROMA_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_pleroma/hostname) function_check pleroma_create_database pleroma_create_database @@ -506,6 +511,7 @@ function restore_remote_pleroma { temp_restore_dir=/root/temppleroma pleroma_dir=$PLEROMA_DIR + PLEROMA_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_pleroma/hostname) function_check pleroma_create_database pleroma_create_database