mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
improve: sort environment variables (#2298)
This commit is contained in:
parent
65120dd934
commit
cac0647250
|
@ -77,12 +77,16 @@ function _setup_default_vars
|
||||||
|
|
||||||
: >/root/.bashrc # make DMS variables available in login shells and their subprocesses
|
: >/root/.bashrc # make DMS variables available in login shells and their subprocesses
|
||||||
: >/etc/dms-settings # this file can be sourced by other scripts
|
: >/etc/dms-settings # this file can be sourced by other scripts
|
||||||
|
|
||||||
local VAR
|
local VAR
|
||||||
for VAR in "${!VARS[@]}"
|
for VAR in "${!VARS[@]}"
|
||||||
do
|
do
|
||||||
echo "export ${VAR}='${VARS[${VAR}]}'" >>/root/.bashrc
|
echo "export ${VAR}='${VARS[${VAR}]}'" >>/root/.bashrc
|
||||||
echo "${VAR}='${VARS[${VAR}]}'" >>/etc/dms-settings
|
echo "${VAR}='${VARS[${VAR}]}'" >>/etc/dms-settings
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sort -o /root/.bashrc /root/.bashrc
|
||||||
|
sort -o /etc/dms-settings /etc/dms-settings
|
||||||
}
|
}
|
||||||
|
|
||||||
# File/folder permissions are fine when using docker volumes, but may be wrong
|
# File/folder permissions are fine when using docker volumes, but may be wrong
|
||||||
|
|
Loading…
Reference in a new issue