Bob Mottram 8 anni fa
parent
commit
40281de73e
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12
    0
      src/freedombone-app-searx

+ 12
- 0
src/freedombone-app-searx Vedi File

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