Prevent the pleroma background from getting overwritten during upgrades

This commit is contained in:
Bob Mottram 2018-02-08 11:25:08 +00:00
parent 63416610d9
commit 2374a4f746
1 changed files with 4 additions and 2 deletions

View File

@ -289,10 +289,12 @@ function install_gnusocial_default_background {
fi
if [ -f ~/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg $basedir/static/bg.jpg
cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg $basedir/static/bg_custom.jpg
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.jpg\",|g" $basedir/static/config.json
else
if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
cp /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg $basedir/static/bg.jpg
cp /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg $basedir/static/bg_custom.jpg
sed -i "s|\"background\":.*|\"background\": \"/static/bg_custom.jpg\",|g" $basedir/static/config.json
fi
fi
}