Bob Mottram 8 年前
父节点
当前提交
40281de73e
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      src/freedombone-app-searx

+ 12
- 0
src/freedombone-app-searx 查看文件

61
         fi
61
         fi
62
     fi
62
     fi
63
 
63
 
64
+    # remove the github ribbon icon
64
     if [ -f /etc/searx/searx/static/themes/courgette/img/github_ribbon.png ]; then
65
     if [ -f /etc/searx/searx/static/themes/courgette/img/github_ribbon.png ]; then
65
         mv /etc/searx/searx/static/themes/courgette/img/github_ribbon.png /etc/searx/searx/static/themes/courgette/img/github_ribbon.png.old
66
         mv /etc/searx/searx/static/themes/courgette/img/github_ribbon.png /etc/searx/searx/static/themes/courgette/img/github_ribbon.png.old
66
     fi
67
     fi
729
 function upgrade_searx {
730
 function upgrade_searx {
730
     settings_file=${SEARX_PATH}/searx/searx/settings.yml
731
     settings_file=${SEARX_PATH}/searx/searx/settings.yml
731
     background_image=/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
732
     background_image=/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
733
+
734
+    # save the background image
732
     if [ -f ${background_image} ]; then
735
     if [ -f ${background_image} ]; then
733
         cp ${background_image} ${background_image}.prev
736
         cp ${background_image} ${background_image}.prev
734
     fi
737
     fi
738
+
739
+    # save the settings
735
     cp ${settings_file} ${settings_file}.prev
740
     cp ${settings_file} ${settings_file}.prev
736
 
741
 
742
+    # do the upgrade
737
     set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
743
     set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
744
+
745
+    # restore the background image
738
     if [ -f ${background_image}.prev ]; then
746
     if [ -f ${background_image}.prev ]; then
739
         cp ${background_image}.prev ${background_image}
747
         cp ${background_image}.prev ${background_image}
740
         chown -R searx:searx ${SEARX_PATH}/searx
748
         chown -R searx:searx ${SEARX_PATH}/searx
741
     fi
749
     fi
750
+
751
+    # restore the settings
742
     if [ -f ${settings_file}.prev ]; then
752
     if [ -f ${settings_file}.prev ]; then
743
         cp ${settings_file}.prev ${settings_file}
753
         cp ${settings_file}.prev ${settings_file}
744
         chown -R searx:searx ${SEARX_PATH}/searx
754
         chown -R searx:searx ${SEARX_PATH}/searx
745
     fi
755
     fi
756
+
757
+    # remove the github ribbon icon
746
     if [ -f /etc/searx/searx/static/themes/courgette/img/github_ribbon.png ]; then
758
     if [ -f /etc/searx/searx/static/themes/courgette/img/github_ribbon.png ]; then
747
         mv /etc/searx/searx/static/themes/courgette/img/github_ribbon.png /etc/searx/searx/static/themes/courgette/img/github_ribbon.png.old
759
         mv /etc/searx/searx/static/themes/courgette/img/github_ribbon.png /etc/searx/searx/static/themes/courgette/img/github_ribbon.png.old
748
     fi
760
     fi