Setting searx background

This commit is contained in:
Bob Mottram 2017-04-16 15:07:39 +01:00
parent 79b2dec434
commit 48d3fd0e3c
3 changed files with 15 additions and 2 deletions

BIN
img/backgrounds/searx.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -48,6 +48,16 @@ searx_variables=(SEARX_REPO
MY_USERNAME
SYSTEM_TYPE)
function searx_set_default_background {
if [ -f ~/freedombone/img/backgrounds/searx.jpg ]; then
cp ~/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
else
if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg ]; then
cp /home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
fi
fi
}
function remove_user_friendica {
remove_username="$1"
@ -613,7 +623,8 @@ function create_searx_config {
}
function upgrade_searx {
set_repo_commit $SEARX_PATH/searx "Search engine commit" "$SEARX_COMMIT" $SEARX_REPO
set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
searx_set_default_background
}
function backup_local_searx {
@ -769,6 +780,8 @@ function install_searx {
create_searx_config
searx_set_default_background
chown -R searx:searx ${SEARX_PATH}/searx
# enable the site

View File

@ -197,7 +197,7 @@ function install_gnusocial_default_background {
cp ~/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
else
if [ -f /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg ]; then
cp /home/$MY_USERNAME/freedombone/img/backgrounds${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
cp /home/$MY_USERNAME/freedombone/img/backgrounds/${gnusocial_type}.jpg /var/www/${domain_name}/htdocs/static/bg.jpg
fi
fi
}