Sfoglia il codice sorgente

Setting searx background

Bob Mottram 8 anni fa
parent
commit
48d3fd0e3c

BIN
img/backgrounds/searx.jpg Vedi File


+ 14
- 1
src/freedombone-app-searx Vedi File

@@ -48,6 +48,16 @@ searx_variables=(SEARX_REPO
48 48
                  MY_USERNAME
49 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 61
 function remove_user_friendica {
52 62
     remove_username="$1"
53 63
 
@@ -613,7 +623,8 @@ function create_searx_config {
613 623
 }
614 624
 
615 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 630
 function backup_local_searx {
@@ -769,6 +780,8 @@ function install_searx {
769 780
 
770 781
     create_searx_config
771 782
 
783
+    searx_set_default_background
784
+
772 785
     chown -R searx:searx ${SEARX_PATH}/searx
773 786
 
774 787
     # enable the site

+ 1
- 1
src/freedombone-utils-gnusocialtools Vedi File

@@ -197,7 +197,7 @@ function install_gnusocial_default_background {
197 197
         cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
198 198
     else
199 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 201
         fi
202 202
     fi
203 203
 }