summaryrefslogtreecommitdiff
path: root/dockerfiles
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2019-08-03 13:53:14 +0200
committerGitHub <noreply@github.com>2019-08-03 13:53:14 +0200
commit91a59ff3502803611953820e2923348440f807d0 (patch)
treea449316a294550d8071f504d1441655f8e1012d7 /dockerfiles
parent333e54943d945a1afcb2ac5a82dd6edcf052be2d (diff)
[fix] Docker: without -f parameter, settings.yml is not replaced by the new version (#1668)
Before this commit, the existing settings.yml were always replaced.
Diffstat (limited to 'dockerfiles')
-rwxr-xr-xdockerfiles/docker-entrypoint.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/dockerfiles/docker-entrypoint.sh b/dockerfiles/docker-entrypoint.sh
index 60e26fd9..c731e0a8 100755
--- a/dockerfiles/docker-entrypoint.sh
+++ b/dockerfiles/docker-entrypoint.sh
@@ -71,7 +71,7 @@ EOF
}
update_conf() {
- FORCE_CONF_UPDATE="$1"
+ FORCE_CONF_UPDATE=$1
CONF="$2"
NEW_CONF="${2}.new"
OLD_CONF="${2}.old"
@@ -81,7 +81,7 @@ update_conf() {
if [ -f "${CONF}" ]; then
if [ "${REF_CONF}" -nt "${CONF}" ]; then
# There is a new version
- if [ $FORCE_CONF_UPDATE ]; then
+ if [ $FORCE_CONF_UPDATE -ne 0 ]; then
# Replace the current configuration
printf '⚠️ Automaticaly update %s to the new version\n' "${CONF}"
if [ ! -f "${OLD_CONF}" ]; then
@@ -107,7 +107,7 @@ update_conf() {
}
# make sure there are uwsgi settings
-update_conf "${FORCE_CONF_UPDATE}" "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
+update_conf ${FORCE_CONF_UPDATE} "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
# make sure there are searx settings
update_conf "${FORCE_CONF_UPDATE}" "${SEARX_SETTINGS_PATH}" "/usr/local/searx/searx/settings.yml" "patch_searx_settings"