on master help sign in
[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.

commit91a59ff3502803611953820e2923348440f807d0 authorAlexandre Flament <alex@al-f.net> dateSat 3 Aug 2019, 13:53 (7 years ago) parent333e549
1 file changed+3−3
dockerfiles/docker-entrypoint.sh+3−3
dockerfiles/docker-entrypoint.sh+3−3
@@ -71,7 +71,7 @@ EOF
7171}
7272
7373update_conf() {
74− FORCE_CONF_UPDATE="$1"
74+ FORCE_CONF_UPDATE=$1
7575 CONF="$2"
7676 NEW_CONF="${2}.new"
7777 OLD_CONF="${2}.old"
@@ -81,7 +81,7 @@ update_conf() {
8181 if [ -f "${CONF}" ]; then
8282 if [ "${REF_CONF}" -nt "${CONF}" ]; then
8383 # There is a new version
84− if [ $FORCE_CONF_UPDATE ]; then
84+ if [ $FORCE_CONF_UPDATE -ne 0 ]; then
8585 # Replace the current configuration
8686 printf '⚠️ Automaticaly update %s to the new version\n' "${CONF}"
8787 if [ ! -f "${OLD_CONF}" ]; then
@@ -107,7 +107,7 @@ update_conf() {
107107}
108108
109109# make sure there are uwsgi settings
110−update_conf "${FORCE_CONF_UPDATE}" "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
110+update_conf ${FORCE_CONF_UPDATE} "${UWSGI_SETTINGS_PATH}" "/usr/local/searx/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
111111
112112# make sure there are searx settings
113113update_conf "${FORCE_CONF_UPDATE}" "${SEARX_SETTINGS_PATH}" "/usr/local/searx/searx/settings.yml" "patch_searx_settings"