mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-10 16:34:42 +08:00
Fix: Fix issues found after integration tests
This commit is contained in:
parent
2593172f87
commit
2717970c72
2 changed files with 14 additions and 6 deletions
|
@ -2,6 +2,13 @@
|
|||
set -e
|
||||
cd integration-tests
|
||||
|
||||
FIND="$(which find)"
|
||||
|
||||
# Support running on macOS with GNU installed under "g*" prefix
|
||||
if command -v gfind > /dev/null 2>&1; then
|
||||
FIND="$(which gfind)"
|
||||
fi
|
||||
|
||||
run_test() {
|
||||
local exit_code
|
||||
echo
|
||||
|
@ -28,7 +35,7 @@ if [[ $# -gt 0 ]]; then
|
|||
shift
|
||||
done
|
||||
else
|
||||
for i in `find -maxdepth 1 -type d | grep -Ev "^./(tester|xoauth2)" | sort`; do
|
||||
for i in `${FIND} -maxdepth 1 -type d | grep -Ev "^./(tester|xoauth2)" | sort`; do
|
||||
i="$(basename "$i")"
|
||||
if [ "$i" == "." ] || [ "$i" == ".." ]; then
|
||||
continue
|
||||
|
|
|
@ -45,7 +45,7 @@ anon_email_log() {
|
|||
}
|
||||
' /etc/rsyslog.conf
|
||||
else
|
||||
info "Emails in the logs will not be anonymized. Set ${emphasis}ANONYMIZE_EMAILS${reset} to enable this feature."
|
||||
notice "Emails in the logs will not be anonymized. Set ${emphasis}ANONYMIZE_EMAILS${reset} to enable this feature."
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -72,24 +72,25 @@ setup_conf() {
|
|||
|
||||
reown_folders() {
|
||||
mkdir -p /var/spool/postfix/pid /var/spool/postfix/dev /var/spool/postfix/private /var/spool/postfix/public
|
||||
if [[ "${SKIP_ROOT_SPOOL_CHOWN}" == "1" ]; then
|
||||
if [[ "${SKIP_ROOT_SPOOL_CHOWN}" == "1" ]]; then
|
||||
warn "${emphasis}SKIP_ROOT_SPOOL_CHOWN${reset} is set. Script will not chown ${emphasis}/var/spool/postfix/${reset}. Make sure you know what you're doing."
|
||||
else
|
||||
debug "Reowing ${emphasis}/var/spool/postfix/${reset}"
|
||||
debug "Reowing ${emphasis}root: /var/spool/postfix/${reset}"
|
||||
if ! chown root: /var/spool/postfix/; then
|
||||
warn "Cannot reown ${emphasis}root:${reset} for ${emphasis}/var/spool/postfix/${reset}. Your installation might be broken."
|
||||
fi
|
||||
|
||||
debug "Reowing ${emphasis}root: /var/spool/postfix/pid/${reset}"
|
||||
if ! chown root: /var/spool/postfix/pid; then
|
||||
warn "Cannot reown ${emphasis}root:${reset} for ${emphasis}/var/spool/postfix/pid/${reset}. Your installation might be broken."
|
||||
fi
|
||||
fi
|
||||
|
||||
debug "Reowing ${emphasis}/var/spool/postfix/private/${reset}"
|
||||
debug "Reowing ${emphasis}postfix:postdrop /var/spool/postfix/private/${reset}"
|
||||
if ! chown -R postfix:postdrop /var/spool/postfix/private; then
|
||||
warn "Cannot reown ${emphasis}postfix:postdrop${reset} for ${emphasis}/var/spool/postfix/private${reset}. Your installation might be broken."
|
||||
fi
|
||||
debug "Reowing ${emphasis}/var/spool/postfix/public/${reset}"
|
||||
debug "Reowing ${emphasis}postfix:postdrop /var/spool/postfix/public/${reset}"
|
||||
if ! chown -R postfix:postdrop /var/spool/postfix/public; then
|
||||
warn "Cannot reown ${emphasis}postfix:postdrop${reset} for ${emphasis}/var/spool/postfix/public${reset}. Your installation might be broken."
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue