浏览代码

Prevent the pleroma background from getting overwritten during upgrades

Bob Mottram 7 年前
父节点
当前提交
2374a4f746
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      src/freedombone-utils-gnusocialtools

+ 4
- 2
src/freedombone-utils-gnusocialtools 查看文件

289
     fi
289
     fi
290
 
290
 
291
     if [ -f ~/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
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
     else
294
     else
294
         if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
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
         fi
298
         fi
297
     fi
299
     fi
298
 }
300
 }