mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-03 09:34:33 +02:00
Updated ShellCheck to 0.8.0
and Hadolint to 2.8.0
(#2329)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
6d06149581
commit
99cc9fec2a
12 changed files with 35 additions and 28 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
function dovecot_quota_to_hr()
|
||||
{
|
||||
if [ "${1}" == "-" ]
|
||||
if [[ ${1} == "-" ]]
|
||||
then
|
||||
echo "~"
|
||||
else
|
||||
|
|
|
@ -35,7 +35,8 @@ fi
|
|||
create_lock # Protect config file with lock to avoid race conditions
|
||||
|
||||
touch "${DATABASE}"
|
||||
if [ -z "${QUOTA}" ]; then
|
||||
if [[ -z ${QUOTA} ]]
|
||||
then
|
||||
read -r -s "Enter quota (e.g. 10M): " QUOTA
|
||||
echo
|
||||
[[ -z "${QUOTA}" ]] && errex "Quota must not be empty. Use 0 for unlimited quota"
|
||||
|
|
|
@ -54,7 +54,7 @@ do
|
|||
# 0 – files are identical
|
||||
# 1 – files differ
|
||||
# 2 – inaccessible or missing argument
|
||||
if [ $? -eq 1 ]
|
||||
if [[ ${?} -eq 1 ]]
|
||||
then
|
||||
_notify 'inf' "$(_log_date) Change detected"
|
||||
create_lock # Shared config safety lock
|
||||
|
|
|
@ -69,7 +69,7 @@ function _populate_relayhost_map
|
|||
# note: won't detect domains when lhs has spaces (but who does that?!)
|
||||
sed -n '/^\s*[^#[:space:]]/ s/^[^@|]*@\([^|]\+\)|.*$/\1/p' /tmp/docker-mailserver/postfix-accounts.cf
|
||||
|
||||
[ -f /tmp/docker-mailserver/postfix-virtual.cf ] && sed -n '/^\s*[^#[:space:]]/ s/^\s*[^@[:space:]]*@\(\S\+\)\s.*/\1/p' /tmp/docker-mailserver/postfix-virtual.cf
|
||||
[[ -f /tmp/docker-mailserver/postfix-virtual.cf ]] && sed -n '/^\s*[^#[:space:]]/ s/^\s*[^@[:space:]]*@\(\S\+\)\s.*/\1/p' /tmp/docker-mailserver/postfix-virtual.cf
|
||||
} | while read -r DOMAIN
|
||||
do
|
||||
# DOMAIN not already present *and* not ignored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue