From 2374a4f74658dd6f6ff97b12a5c21cb754919f82 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 8 Feb 2018 11:25:08 +0000 Subject: [PATCH] Prevent the pleroma background from getting overwritten during upgrades --- src/freedombone-utils-gnusocialtools | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 74077e61..283eba67 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -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 }