Add version variable (#1976)

This commit is contained in:
Casper 2021-05-17 14:54:43 +02:00 committed by GitHub
parent c5049c60da
commit 225e21edb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -162,7 +162,13 @@ RUN \
touch /var/log/auth.log && \
update-locale && \
rm /etc/postsrsd.secret && \
rm /etc/cron.daily/00logwatch
rm /etc/cron.daily/00logwatch && \
if [[ ${VCS_VER} =~ ^refs/tags/v.+ ]]; then \
echo "export DMS_VERSION='${VCS_VER:11}'" >>/root/.bashrc; \
else \
echo "export DMS_VERSION='${VCS_REF}'" >>/root/.bashrc; \
fi
#
# PostSRSD, Postgrey & Amavis

View file

@ -249,13 +249,16 @@ function _defunc
# shellcheck source=./startup/daemons-stack.sh
. /usr/local/bin/daemons-stack.sh
# source DMS_VERSION variable
. /root/.bashrc
#
# ? << Sourcing all stacks
#
# ? >> Executing all stacks
#
_notify 'inf' 'Welcome to docker-mailserver'
_notify 'tasklog' "Welcome to docker-mailserver ${DMS_VERSION}"
_notify 'inf' 'ENVIRONMENT'
[[ ${DMS_DEBUG} -eq 1 ]] && printenv
@ -269,6 +272,6 @@ start_daemons
_notify 'tasklog' "${HOSTNAME} is up and running"
touch /var/log/mail/mail.log
tail -fn 0 /var/log/mail/mail.log
tail -Fn 0 /var/log/mail/mail.log
exit 0