- Replace ENV_SED by ENV_NET_SED environment variable.
This commit is contained in:
parent
69b26b35bf
commit
b7170807d5
@ -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
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -415,15 +415,25 @@ fi
|
||||
|
||||
|
||||
>${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)
|
||||
do
|
||||
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
|
||||
|
||||
echo ENV_SED=\'"${ENV_SED}"\' >>${APPL_HOME_DIR}/.env
|
||||
echo ENV_NET_SED=\'"${ENV_NET_SED}"\' >>${APPL_HOME_DIR}/.env
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user