- Replace ENV_SED by ENV_NET_SED environment variable.

This commit is contained in:
Arnaud G. GIBERT 2025-01-13 10:36:28 +01:00
parent 69b26b35bf
commit 076e763cc6
2 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,11 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Docker Tools V 1.3.4 - A. GIBERT - 2025/01/13
------------------------------------------------------------------------------------------------------------------------------------
- Replace ENV_SED by ENV_NET_SED environment variable.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Docker Tools V 1.3.3 - A. GIBERT - 2025/01/05 Rx3-Docker/Docker Tools V 1.3.3 - A. GIBERT - 2025/01/05
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@ -415,15 +415,25 @@ fi
>${APPL_HOME_DIR}/.env >${APPL_HOME_DIR}/.env
ENV_SED=""
ENV_NET_SED=""
for var in $( ( grep "^ *[a-zA-Z0-9_-]*=" ${APPL_HOME_DIR}/env | sed -e "s/=.*//" -e "s/ *//"; echo ${DYNVAR_LIST} | sed -e 's/ /\n/g') | sort -u) for var in $( ( grep "^ *[a-zA-Z0-9_-]*=" ${APPL_HOME_DIR}/env | sed -e "s/=.*//" -e "s/ *//"; echo ${DYNVAR_LIST} | sed -e 's/ /\n/g') | sort -u)
do do
echo "${var}='${!var}'" >>${APPL_HOME_DIR}/.env echo "${var}='${!var}'" >>${APPL_HOME_DIR}/.env
ENV_SED="${ENV_SED}s/\${${var}}/${!var//\//\\/}/g
pat="s/\${${var}}/${!var//\//\\/}/g
" "
ENV_SED="${ENV_SED}${pat}"
if [[ ${var} =~ _HOST_ ]] || ( [[ ${var} =~ _PORT_ ]] && [[ ${var} =~ _INT ]])
then
ENV_NET_SED="${ENV_NET_SED}${pat}"
fi
done done
echo ENV_SED=\'"${ENV_SED}"\' >>${APPL_HOME_DIR}/.env echo ENV_NET_SED=\'"${ENV_NET_SED}"\' >>${APPL_HOME_DIR}/.env