Ensure that custom pleroma emoji don't get lost during upgrade
This commit is contained in:
parent
ed9b8f77cf
commit
e17aebfa11
|
@ -637,6 +637,7 @@ function pleroma_add_emoji {
|
|||
else
|
||||
sed -i "s|${shortcode},.*|${shortcode}, /emoji/${shortcode}.${image_extension}|g" $PLEROMA_DIR/config/emoji.txt
|
||||
fi
|
||||
cp $PLEROMA_DIR/config/emoji.txt $PLEROMA_DIR/config/emoji_prev.txt
|
||||
|
||||
chown -R pleroma:pleroma $PLEROMA_DIR
|
||||
clear
|
||||
|
@ -704,6 +705,10 @@ function upgrade_pleroma {
|
|||
# make a copy of the configuration
|
||||
cp $PLEROMA_DIR/priv/static/static/config.json $PLEROMA_DIR/priv/static/static/config_prev.json
|
||||
|
||||
if [ -f $PLEROMA_DIR/config/emoji.txt ]; then
|
||||
cp $PLEROMA_DIR/config/emoji.txt $PLEROMA_DIR/config/emoji_prev.txt
|
||||
fi
|
||||
|
||||
function_check set_repo_commit
|
||||
set_repo_commit $PLEROMA_DIR "pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
|
||||
chown -R pleroma:pleroma $PLEROMA_DIR
|
||||
|
@ -712,6 +717,11 @@ function upgrade_pleroma {
|
|||
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
|
||||
|
||||
if [ -f $PLEROMA_DIR/config/emoji_prev.txt ]; then
|
||||
cp $PLEROMA_DIR/config/emoji_prev.txt $PLEROMA_DIR/config/emoji.txt
|
||||
chown pleroma:pleroma $PLEROMA_DIR/config/emoji.txt
|
||||
fi
|
||||
|
||||
sudo -u pleroma mix deps.get
|
||||
pleroma_recompile
|
||||
|
||||
|
|
Loading…
Reference in New Issue