Commit 85e4c47b authored by ale's avatar ale
Browse files

Initialize the site list at startup

parent c8c5291e
......@@ -2,6 +2,7 @@ FROM registry.git.autistici.org/ai3/docker-apache2-base:master
COPY conf /tmp/conf
COPY build.sh /tmp/build.sh
COPY start.sh /start.sh
COPY apply-forced-params /usr/local/bin/apply-forced-params
RUN /tmp/build.sh && rm -fr /tmp/build.sh /tmp/conf
......
mailman_setup.service: {
type: oneshot,
stdout: inherit,
service_groups: INIT,
process_timeout: 600,
command: "/start.sh",
}
#!/bin/sh
# Check that /data is mounted and looks usable.
if [ ! -d /data/lists ]; then
echo "/data does not look usable"
exit 1
fi
# Initialize the site list if necessary.
if [ ! -e /data/lists/mailman ]; then
echo "initializing site list..."
# The site list password can optionally be passed in
# /etc/mailman/site_pass.
password=password
if [ -e /etc/mailman/site_pass ]; then
password=`cat /etc/mailman/site_pass`
fi
/var/lib/mailman/bin/newlist -q mailman noreply@autistici.org "$password"
fi
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment