Retain chat status during pleroma upgrades
This commit is contained in:
parent
201de6a3e6
commit
21d54bc219
|
@ -755,6 +755,11 @@ function upgrade_pleroma {
|
|||
pleroma_registrations=
|
||||
fi
|
||||
|
||||
pleroma_chat_enabled=1
|
||||
if grep -q ':chat, enabled: false' $PLEROMA_DIR/config/config.exs; then
|
||||
pleroma_chat_enabled=
|
||||
fi
|
||||
|
||||
# make a copy of the configuration
|
||||
cp $PLEROMA_DIR/priv/static/static/config.json $PLEROMA_DIR/priv/static/static/config_prev.json
|
||||
|
||||
|
@ -787,6 +792,12 @@ function upgrade_pleroma {
|
|||
sed -i 's|registrations_open: True|registrations_open: false|g' $PLEROMA_DIR/config/config.exs
|
||||
fi
|
||||
|
||||
if [ ! $pleroma_chat_enabled ]; then
|
||||
sed -i 's|config :pleroma, :chat.*|config :pleroma, :chat, enabled: false|g' $PLEROMA_DIR/config/config.exs
|
||||
else
|
||||
sed -i 's|config :pleroma, :chat.*|config :pleroma, :chat, enabled: true|g' $PLEROMA_DIR/config/config.exs
|
||||
fi
|
||||
|
||||
pleroma_recompile
|
||||
|
||||
# migrate database
|
||||
|
|
Loading…
Reference in New Issue