summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-09-09 16:28:39 +0200
committerJonas Smedegaard <dr@jones.dk>2012-09-09 17:43:59 +0200
commit3947d475419f28f5c96d3db96eea26d8e1e92314 (patch)
treeed83105b68191acc6316391313961f9f9df8f196 /postfix
parentb3d471b94029499a7df2c7e6909b17e9d1d2d54c (diff)
Make $configdirs reusable for non-postfix lookups.
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh7
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