Add mirror scripts and config
[grml-mirrors.git] / bin / run_mirmon
diff --git a/bin/run_mirmon b/bin/run_mirmon
new file mode 100755 (executable)
index 0000000..eb27e2c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#update mirrorlist from git
+cd /usr/local/src/grml-mirrors
+git reset --hard >/dev/null
+git pull >/dev/null
+perl masterlist2mirmon Mirrors.masterlist > /etc/mirmon/mirror.list
+#first run mirmon
+LC_ALL=C /usr/bin/mirmon -q -get update 2>/dev/null
+#then generatore the mirror map 
+/usr/local/bin/generate_mirror_map > /etc/apache2/grml.map
+#give a hint to apache2 
+/usr/sbin/apache2ctl graceful