Parcourir la source

Prevent the pleroma background from getting overwritten during upgrades

Bob Mottram il y a 7 ans
Parent
révision
2374a4f746
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4
    2
      src/freedombone-utils-gnusocialtools

+ 4
- 2
src/freedombone-utils-gnusocialtools Voir le fichier

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