diff options
-rwxr-xr-x | postfix/postfix.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index 0132451..6d19240 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -39,7 +39,7 @@ cacert_lmtp= cacert_default="/etc/ssl/certs/ca-certificates.crt" realmsdir='/etc/local-REDPILL' -configdirs='/etc/local/postfix /etc/local-ORG/postfix /etc/local-REDPILL/postfix /etc/local-COMMON/postfix' +configdirs='/etc/local /etc/local-ORG /etc/local-REDPILL /etc/local-COMMON' confdir='/etc/postfix' postconf=/usr/sbin/postconf sp='[[:space:]]' @@ -155,10 +155,11 @@ catallfilesfromotherrealms() { catfirstfile() { set -e file="$1" + context="${2:-postfix}" configdir='' for dir in $configdirs; do - if [ -d "$dir" ] && [ -f "$dir/$file" ]; then - configdir="$dir" + if [ -d "$dir/$context" ] && [ -f "$dir/$context/$file" ]; then + configdir="$dir/$context" break fi done |