Bladeren bron

Setting searx background

Bob Mottram 8 jaren geleden
bovenliggende
commit
48d3fd0e3c
3 gewijzigde bestanden met toevoegingen van 15 en 2 verwijderingen
  1. BIN
      img/backgrounds/searx.jpg
  2. 14
    1
      src/freedombone-app-searx
  3. 1
    1
      src/freedombone-utils-gnusocialtools

BIN
img/backgrounds/searx.jpg Bestand weergeven


+ 14
- 1
src/freedombone-app-searx Bestand weergeven

48
                  MY_USERNAME
48
                  MY_USERNAME
49
                  SYSTEM_TYPE)
49
                  SYSTEM_TYPE)
50
 
50
 
51
+function searx_set_default_background {
52
+    if [ -f ~/freedombone/img/backgrounds/searx.jpg ]; then
53
+        cp ~/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
54
+    else
55
+        if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg ]; then
56
+            cp /home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
57
+        fi
58
+    fi
59
+}
60
+
51
 function remove_user_friendica {
61
 function remove_user_friendica {
52
     remove_username="$1"
62
     remove_username="$1"
53
 
63
 
613
 }
623
 }
614
 
624
 
615
 function upgrade_searx {
625
 function upgrade_searx {
616
-    set_repo_commit $SEARX_PATH/searx "Search engine commit" "$SEARX_COMMIT" $SEARX_REPO
626
+    set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
627
+    searx_set_default_background
617
 }
628
 }
618
 
629
 
619
 function backup_local_searx {
630
 function backup_local_searx {
769
 
780
 
770
     create_searx_config
781
     create_searx_config
771
 
782
 
783
+    searx_set_default_background
784
+
772
     chown -R searx:searx ${SEARX_PATH}/searx
785
     chown -R searx:searx ${SEARX_PATH}/searx
773
 
786
 
774
     # enable the site
787
     # enable the site

+ 1
- 1
src/freedombone-utils-gnusocialtools Bestand weergeven

197
         cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
197
         cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
198
     else
198
     else
199
         if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
199
         if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
200
-            cp /home/$MY_USERNAME/freedombone/img/backgrounds${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
200
+            cp /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
201
         fi
201
         fi
202
     fi
202
     fi
203
 }
203
 }