Skip to content
Snippets Groups Projects
Commit 88d3350d authored by Patrick Cernko's avatar Patrick Cernko
Browse files

silenced

parent 9d241a30
No related branches found
No related tags found
No related merge requests found
......@@ -59,12 +59,10 @@ if [ $COUNT -gt 0 ]; then
fi
# Copy mbox file
echo "Step 1: copying input file to expl/$LIST_NAME/archives/$MBOX_BACKUP" >&2
cp -v "$MBOX_FILE" "$SYMPA_ROOT/list_data/$SYMPA_DOMAIN/$LIST_NAME/archives/$MBOX_BACKUP"
pushd "$SYMPA_ROOT/list_data/$SYMPA_DOMAIN/$LIST_NAME/archives"
# Convert to Sympa text archives
echo "Step 2: converting $MBOX_BACKUP into .log files" >&2
$base/mbox2sympa.pl $MBOX_BACKUP
rm -f $MBOX_BACKUP
......@@ -72,10 +70,13 @@ chown -R $SYMPA_USER "$SYMPA_ROOT/list_data/$SYMPA_DOMAIN/$LIST_NAME/archives"
chmod -R g=rX,o= "$SYMPA_ROOT/list_data/$SYMPA_DOMAIN/$LIST_NAME/archives"
# Convert to Sympa web archives input files
echo "Step 3: converting .log files into arc/${LIST_NAME}\@${SYMPA_DOMAIN}/\*/arctxt files" >&2
sudo -u sympa /usr/share/sympa/bin/arc2webarc.pl $LIST_NAME $SYMPA_DOMAIN || true
function arc2webarc_filter() {
grep -vxE ' *|Bursting archives|Found [0-9]* messages|Rebuilding HTML|notice Sympa::Spool::store\(\) Sympa::Message <> is stored into Sympa::Spool::Archive as <.*>|Have a look in /var/lib/sympa/arc/.*/-/ directory for messages dateless|Now, you should add a web_archive parameter in the config file to make it accessible from the web' >&2 || true
}
if ! sudo -u sympa /usr/share/sympa/bin/arc2webarc.pl $LIST_NAME $SYMPA_DOMAIN 2> >(arc2webarc_filter); then
echo "Failed: sudo -u sympa /usr/share/sympa/bin/arc2webarc.pl $LIST_NAME $SYMPA_DOMAIN" >&2
exit 1
fi
# That's it!
echo "Job done - web archives should be ready in a few minutes" >&2
echo "You may monitor the Sympa log for errors..." >&2
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment