r884 - in html/trunk: . scripts

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Sat Nov 20 11:07:50 PST 2004


Author: lizardo
Date: 2004-11-20 12:07:48 -0700 (Sat, 20 Nov 2004)
New Revision: 884

Added:
   html/trunk/scripts/lfs-rsync.sh
Modified:
   html/trunk/becomemirror.html
Log:
Added lfs-rsync.sh to the repository so we can modify it if necessary.


Modified: html/trunk/becomemirror.html
===================================================================
--- html/trunk/becomemirror.html	2004-11-20 18:48:52 UTC (rev 883)
+++ html/trunk/becomemirror.html	2004-11-20 19:07:48 UTC (rev 884)
@@ -80,7 +80,7 @@
 
 
 <h3>rsync script</h3>
-	<p><a href="http://linuxfromscratch.org/~gerard/lfs-rsync.sh">lfs-rsync.sh</a> is  the script you will need to download and run twice an hour. Modify the HTMLDIR variable in this script to point to where you store the LFS website. When you let us know you want to become a mirror, we will assign you the times you can run the script (we assign you a time so not all mirrors try to sync at the same time).</p>
+	<p><a href="/scripts/lfs-rsync.sh">lfs-rsync.sh</a> is  the script you will need to download and run twice an hour. Modify the HTMLDIR variable in this script to point to where you store the LFS website. When you let us know you want to become a mirror, we will assign you the times you can run the script (we assign you a time so not all mirrors try to sync at the same time).</p>
 
 <h2>Become an FTP mirror</h2>
 	<p>The requirements are for becoming an FTP mirror are:</p>

Added: html/trunk/scripts/lfs-rsync.sh
===================================================================
--- html/trunk/scripts/lfs-rsync.sh	2004-11-20 18:48:52 UTC (rev 883)
+++ html/trunk/scripts/lfs-rsync.sh	2004-11-20 19:07:48 UTC (rev 884)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+HTMLDIR=/var/www/htdocs/lfssite
+
+cd $HTMLDIR/timestamp
+oldstamp=$(cat timestamp)
+
+rsync -cr linuxfromscratch.org::lfs-timestamp .
+
+newstamp=$(cat timestamp)
+
+if [ $newstamp -gt $oldstamp ]; then
+	rsync -clprtz --delete linuxfromscratch.org::lfs-website $HTMLDIR
+fi
+




More information about the website mailing list