Remove proxy entry from main pleroma config

This commit is contained in:
Bob Mottram 2018-04-23 11:33:02 +01:00
parent 21d54bc219
commit adcfed0555
1 changed files with 27 additions and 4 deletions

View File

@ -726,6 +726,32 @@ function configure_interactive_pleroma {
done
}
function pleroma_upgrade_tor {
pleroma_tor_update=
if ! grep -q '9050' $pleroma_secret; then
pleroma_tor_update=1
fi
if ! grep -q '# config :pleroma, :http, proxy_url:' $PLEROMA_DIR/config/config.exs; then
pleroma_tor_update=1
fi
if [ ! $pleroma_tor_update ]; then
return
fi
if ! grep -q '9050' $pleroma_secret; then
sed -i '/url: /aconfig :pleroma, :http, proxy_url: "127.0.0.1:9050"' $pleroma_secret
fi
if ! grep -q '# config :pleroma, :http, proxy_url:' $PLEROMA_DIR/config/config.exs; then
sed -i 's|config :pleroma, :http, proxy_url:|# config :pleroma, :http, proxy_url:|g' $PLEROMA_DIR/config/config.exs
fi
pleroma_recompile
}
function upgrade_pleroma {
read_config_param PLEROMA_DOMAIN_NAME
read_config_param PLEROMA_EXPIRE_MONTHS
@ -740,10 +766,7 @@ function upgrade_pleroma {
create_pleroma_blocklist
fi
if ! grep -q '9050' $pleroma_secret; then
sed -i '/url: /aconfig :pleroma, :http, proxy_url: "127.0.0.1:9050"' $pleroma_secret
pleroma_recompile
fi
pleroma_upgrade_tor
CURR_PLEROMA_COMMIT=$(get_completion_param "pleroma commit")
if [[ "$CURR_PLEROMA_COMMIT" == "$PLEROMA_COMMIT" ]]; then