Skip to content

Commit

Permalink
Fix: Fix issues found after integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Mar 28, 2022
1 parent 2593172 commit 2717970
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
9 changes: 8 additions & 1 deletion integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 6 additions & 5 deletions scripts/common-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 2717970

Please sign in to comment.