Ensure that searx settings are preserved during upgrades
This commit is contained in:
parent
079e370def
commit
20f33b5b82
|
@ -723,16 +723,22 @@ function create_searx_config {
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgrade_searx {
|
function upgrade_searx {
|
||||||
|
settings_file=${SEARX_PATH}/searx/searx/settings.yml
|
||||||
background_image=/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
|
background_image=/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
|
||||||
if [ -f ${background_image} ]; then
|
if [ -f ${background_image} ]; then
|
||||||
cp ${background_image} ${background_image}.prev
|
cp ${background_image} ${background_image}.prev
|
||||||
fi
|
fi
|
||||||
|
cp ${settings_file} ${settings_file}.prev
|
||||||
|
|
||||||
set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
|
set_repo_commit $SEARX_PATH/searx "searx commit" "$SEARX_COMMIT" $SEARX_REPO
|
||||||
if [ -f ${background_image}.prev ]; then
|
if [ -f ${background_image}.prev ]; then
|
||||||
cp ${background_image}.prev ${background_image}
|
cp ${background_image}.prev ${background_image}
|
||||||
chown -R searx:searx ${SEARX_PATH}/searx
|
chown -R searx:searx ${SEARX_PATH}/searx
|
||||||
fi
|
fi
|
||||||
|
if [ -f ${settings_file}.prev ]; then
|
||||||
|
cp ${settings_file}.prev ${settings_file}
|
||||||
|
chown -R searx:searx ${SEARX_PATH}/searx
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_local_searx {
|
function backup_local_searx {
|
||||||
|
|
Loading…
Reference in New Issue