Skip to content

Commit

Permalink
Merge pull request #720 from maxking/fix-chown
Browse files Browse the repository at this point in the history
Create the var directory before trying to chown.
  • Loading branch information
maxking authored Aug 31, 2024
2 parents ccbf86d + fcf7196 commit 5a6db6e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,17 @@ echo "HYPERKITTY_API_KEY not defined, skipping HyperKitty setup..."
fi

# Now chown the places where mailman wants to write stuff.
chown -R mailman /opt/mailman/var
VAR_DIR="/opt/mailman/var"
# Check if the directory exists
if [ ! -d "$VAR_DIR" ]; then
# Directory does not exist, so create it
mkdir -p "$VAR_DIR"
echo "Directory $VAR_DIR created."
else
echo "Directory $VAR_DIR already exists."
fi

chown -R mailman $VAR_DIR

# Generate the LMTP files for postfix if needed.
su-exec mailman mailman aliases
Expand Down

0 comments on commit 5a6db6e

Please sign in to comment.