mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-10 09:24:50 +02:00
change if style (#3361)
This commit is contained in:
parent
0e592aa911
commit
cf74127f78
58 changed files with 297 additions and 594 deletions
|
@ -9,8 +9,7 @@ CHANGELOG_URL='https://github.com/docker-mailserver/docker-mailserver/blob/maste
|
|||
|
||||
# check for correct syntax
|
||||
# number + suffix. suffix must be 's' for seconds, 'm' for minutes, 'h' for hours or 'd' for days.
|
||||
if [[ ! ${UPDATE_CHECK_INTERVAL} =~ ^[0-9]+[smhd]{1}$ ]]
|
||||
then
|
||||
if [[ ! ${UPDATE_CHECK_INTERVAL} =~ ^[0-9]+[smhd]{1}$ ]]; then
|
||||
_log_with_date 'warn' "Invalid 'UPDATE_CHECK_INTERVAL' value '${UPDATE_CHECK_INTERVAL}'"
|
||||
_log_with_date 'warn' 'Falling back to daily update checks'
|
||||
UPDATE_CHECK_INTERVAL='1d'
|
||||
|
@ -22,13 +21,11 @@ do
|
|||
LATEST=$(curl -Lsf "${VERSION_URL}")
|
||||
|
||||
# did we get a valid response?
|
||||
if [[ ${LATEST} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
|
||||
then
|
||||
if [[ ${LATEST} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
_log_with_date 'debug' 'Remote version information fetched'
|
||||
|
||||
# compare versions
|
||||
if dpkg --compare-versions "${VERSION}" lt "${LATEST}"
|
||||
then
|
||||
if dpkg --compare-versions "${VERSION}" lt "${LATEST}"; then
|
||||
# send mail notification to postmaster
|
||||
read -r -d '' MAIL << EOF
|
||||
Hello ${POSTMASTER_ADDRESS}!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue