Commit 31e2ce3d authored by Marcin Owsiany's avatar Marcin Owsiany

Document the actual commands used for generating stats, for easiness of recovery.

CVS version numbers

get-www-stats: 1.1 -> 1.2
parent f1953472
......@@ -17,9 +17,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This program is run daily on a Debian website mirror like this:
# This program is run from a crontab on a Debian website mirror like this:
#
# get-www-stats > stats.txt-pending && mv stats.txt-pending stats.txt
# # Atomically and concurrent-safely create a stats.tgz
# 18 3 * * * cd "$HOME" && d=$(mktemp -d stats-wip-XXXXXXXXXX) && printf '{"hostname:"\%s"}' $(hostname -f) > "$d/stats.meta.json" && ./get-www-stats > "$d/stats.json" && tar zcf stats-wip.tgz "$d" && rm -rf "$d" && mv stats-wip.tgz stats.tgz
#
# And the output is transferred to dde.debian.net like this:
#
# # Atomically transfer stats and replace them.
# 18 4 * * * cd $HOME && { [ ! -e stats-old ] || please_cleanup_failed_run ; } && cp -al stats-new stats-old && ln -s stats-old stats-old.s && mv -T stats-old.s stats && { scp -q -i .ssh/stats-transfer-nopass senfl.debian.org:stats.tgz stats.tgz || scp_failed ; } && rm -rf stats-new && mkdir stats-new && tar zxf stats.tgz -C stats-new --strip-components=1 && rm stats.tgz && ln -s stats-new stats-new.s && mv -T stats-new.s stats && rm -rf stats-old
#
# The output is then exported via DDE (see http://wiki.debian.org/DDE) and used
# by the stattrans.pl script to sort the page lists in the Debian web site
......
Markdown is supported
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