summaryrefslogtreecommitdiffstats
path: root/etc/periodic/15min/hyperarchives
blob: ef4b68b03ff358473515efb6db69b6f9d519b003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
# Brute Force the hypermail archives each evening


candidates="$(find /var/spool/mlmmj -type d -name "archive" | sed "s-/archive--; s-^.*/--")"

for x in $candidates; do
    /etc/hypermail/mdir2mbox.lua /var/spool/mlmmj/$x/archive 2>/dev/null 1>/tmp/archive.mbox
    rm -rf /var/www/domains/lists.alpinelinux.org/www/$x
    hypermail -c /etc/hypermail/hmrc -d /var/www/domains/lists.alpinelinux.org/www/$x \
        -m /tmp/archive.mbox -l "$x" -s html -T 2>/dev/null 1>/dev/null
    rm /tmp/archive.mbox
    cp /etc/hypermail/*.css /var/www/domains/lists.alpinelinux.org/www/$x/
    sh /etc/hypermail/reverse-summary-order.sh /var/www/domains/lists.alpinelinux.org/www/$x/summary.html > /tmp/summary.html
    mv /tmp/summary.html /var/www/domains/lists.alpinelinux.org/www/$x/summary.html
done

cp /etc/hypermail/styles.css /var/www/domains/lists.alpinelinux.org/www/

cat >/var/www/domains/lists.alpinelinux.org/www/index.html <<-EOF 
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="generator" content="hypermail, see http://www.hypermail-project.org/" />
    <title>lists.alpinelinux.org Mail archives</title>
    <meta name="%l" content="%s" />
    <link rel="stylesheet" type="text/css" href="styles.css"/>
    <link rel="stylesheet" type="text/css" href="http://alpinelinux.org/font.css"/> <!-- logo -->
    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600" />
    <link rel="shortcut icon" href="http://alpinelinux.org/alpine-logo.ico" />
</head>
<body>
    <div class="head_top">
        <a class="alpine-logo left" href="http://alpinelinux.org"><span class="icon-alpine-logo"></span></a>
        <div id="title"><h1>lists.alpinelinux.org<br />Mail archives</h1></div>
    </div>
    <div class="searchbox">
        &nbsp; Google site search for <a href="http://lists.alpinelinux.org">http://lists.alpinelinux.org</a>
        <form method="get" action="http://www.google.com/search?query">
            <input size="50" name="query" value=""> 
            <input type="hidden" name="sitesearch" value="lists.alpinelinux.org">
            <input type="submit" value="Search">
        </form>
    </div>
    <table class="archive_list">
EOF

for x in $candidates; do
    echo "
    <tr>
        <td><a href=\"$x/summary.html\">$x</a></td>
        <td><a href=\"$x/summary.html\">summary</a></td>
        <td><a href=\"$x/index.html\">all</a></td>
    </tr>
    " >> /var/www/domains/lists.alpinelinux.org/www/index.html
done
cat >>/var/www/domains/lists.alpinelinux.org/www/index.html <<-EOF 
    </table>
    <div class="footer">© Copyright 2015 Alpine Linux Development Team all rights reserved | <a href="/privacy-policy.html">Privacy Policy</a></div>
</body>
</html>
EOF