Ensure that the pleroma config doesn't get overwritten during upgrades
This commit is contained in:
parent
02598e7885
commit
8790ec7ebb
|
@ -700,6 +700,9 @@ function upgrade_pleroma {
|
|||
return
|
||||
fi
|
||||
|
||||
# make a copy of the configuration
|
||||
cp $PLEROMA_DIR/priv/static/static/config.json $PLEROMA_DIR/priv/static/static/config_prev.json
|
||||
|
||||
function_check set_repo_commit
|
||||
set_repo_commit $PLEROMA_DIR "pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
|
||||
chown -R pleroma:pleroma $PLEROMA_DIR
|
||||
|
@ -709,6 +712,12 @@ function upgrade_pleroma {
|
|||
|
||||
expire_pleroma_posts $PLEROMA_DOMAIN_NAME $PLEROMA_EXPIRE_MONTHS
|
||||
create_pleroma_blocklist
|
||||
|
||||
# restore the configuration
|
||||
cp $PLEROMA_DIR/priv/static/static/config_prev.json $PLEROMA_DIR/priv/static/static/config.json
|
||||
chown pleroma:pleroma $PLEROMA_DIR/priv/static/static/config.json
|
||||
|
||||
systemctl restart pleroma
|
||||
}
|
||||
|
||||
function backup_local_pleroma {
|
||||
|
|
Loading…
Reference in New Issue