coherent renaming of functions

This commit is contained in:
Georg Lauterbach 2020-09-05 16:53:36 +02:00
parent bf679a5504
commit 67e1e586c7
No known key found for this signature in database
GPG key ID: 386D76E7AD496709
4 changed files with 227 additions and 228 deletions

View file

@ -82,7 +82,6 @@ Minimum:
Download the docker-compose.yml, the .env and the setup.sh files: Download the docker-compose.yml, the .env and the setup.sh files:
``` BASH ``` BASH
curl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh curl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh

View file

@ -80,7 +80,7 @@ do
fi fi
done done
;; ;;
* ) notify 'err' 'file not found for certificate in check_for_changes.sh' ;; * ) _notify 'warn' 'file not found for certificate in check_for_changes.sh' ;;
esac esac
done done

View file

@ -107,7 +107,7 @@ export -f _extract_certs_from_acme
declare -A DEFAULT_VARS declare -A DEFAULT_VARS
DEFAULT_VARS["DMS_DEBUG"]="${DMS_DEBUG:="0"}" DEFAULT_VARS["DMS_DEBUG"]="${DMS_DEBUG:="0"}"
function notify() function _notify()
{ {
c_red="\e[0;31m" c_red="\e[0;31m"
c_green="\e[0;32m" c_green="\e[0;32m"
@ -149,7 +149,7 @@ function notify()
[[ -n "${msg}" ]] && echo $options "${msg}" [[ -n "${msg}" ]] && echo $options "${msg}"
} }
export -f notify export -f _notify
# ? Relay Host Map ---------------------------------------- # ? Relay Host Map ----------------------------------------
@ -168,7 +168,7 @@ function _populate_relayhost_map()
if [[ -f /tmp/docker-mailserver/postfix-relaymap.cf ]] if [[ -f /tmp/docker-mailserver/postfix-relaymap.cf ]]
then then
notify 'inf' "Adding relay mappings from postfix-relaymap.cf" _notify 'inf' "Adding relay mappings from postfix-relaymap.cf"
# keep lines which are not a comment *and* have a destination. # keep lines which are not a comment *and* have a destination.
sed -n '/^\s*[^#[:space:]]\S*\s\+\S/p' /tmp/docker-mailserver/postfix-relaymap.cf >> /etc/postfix/relayhost_map sed -n '/^\s*[^#[:space:]]\S*\s\+\S/p' /tmp/docker-mailserver/postfix-relaymap.cf >> /etc/postfix/relayhost_map
fi fi
@ -183,7 +183,7 @@ function _populate_relayhost_map()
# domain not already present *and* not ignored # domain not already present *and* not ignored
if ! grep -q -e "^@${domain}\b" /etc/postfix/relayhost_map && ! grep -qs -e "^\s*@${domain}\s*$" /tmp/docker-mailserver/postfix-relaymap.cf if ! grep -q -e "^@${domain}\b" /etc/postfix/relayhost_map && ! grep -qs -e "^\s*@${domain}\s*$" /tmp/docker-mailserver/postfix-relaymap.cf
then then
notify 'inf' "Adding relay mapping for ${domain}" _notify 'inf' "Adding relay mapping for ${domain}"
echo "@${domain} [$RELAY_HOST]:$RELAY_PORT" >> /etc/postfix/relayhost_map echo "@${domain} [$RELAY_HOST]:$RELAY_PORT" >> /etc/postfix/relayhost_map
fi fi
done done

File diff suppressed because it is too large Load diff