--- /dev/null
+#!/bin/bash
+#
+# Git maintenance script, run by cron.
+
+# Update symlinks to user git repo locations.
+find /afs/hcoop.net/user -mindepth 3 -maxdepth 3 -noleaf -exec \
+ sh -c "test -e {}/.hcoop-git && \
+ ln -s {}/.hcoop-git/ /var/cache/git/\$(basename {}) 2>/dev/null" \;
+
+# Update cache of front page.
+cache=/var/local/lib/gitweb/indexcache.html
+wget -q -O $cache.tmp 'http://git.hcoop.net/test?nocache=y'
+chmod a+r $cache.tmp
+mv $cache.tmp $cache