Scripts that tests do not work if mirror is on a subdir.
Patch attached for checkSAupdateMirrors.sh, is this one the correct script ?

 Giovanni

On Wed, Nov 18, 2020 at 04:43:34PM -0500, Kevin A. McGrail wrote:
> Only a PMC member with Commit rates can do this themselves.  The scripts
> that test will yell if your mirror is down or stale.
> --
> Kevin A. McGrail
> Member, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin Project
> https://www.linkedin.com/in/kmcgrail - 703.798.0171
> 
> 
> On Wed, Nov 18, 2020 at 2:22 AM Giovanni Bechis <giova...@paclan.it> wrote:
> 
> > I have setup my mirror as per SaUpdateMirrorSetup[¹] and it's working.
> > I do not think it's correct that I do everything on my own without other
> > people
> > testing it but if it's ok I will proceed this way.
> >
> > [¹]
> > https://cwiki.apache.org/confluence/display/SPAMASSASSIN/SaUpdateMirrorSetup
> >
> > On Tue, Nov 17, 2020 at 03:06:40PM -0500, Kevin A. McGrail wrote:
> > > If you have everything working, you can update the MIRRORED.BY in this
> > repo
> > > https://svn.apache.org/repos/asf/spamassassin/site/updates and add your
> > > mirror, contact info and weight in like and kind to what is there.
> > > --
> > > Kevin A. McGrail
> > > Member, Apache Software Foundation
> > > Chair Emeritus Apache SpamAssassin Project
> > > https://www.linkedin.com/in/kmcgrail - 703.798.0171
> > >
> > >
> > > On Sat, Nov 14, 2020 at 11:45 AM Giovanni Bechis <giova...@paclan.it>
> > wrote:
> > >
> > > > Hi,
> > > > I have a private mirror [http://sa-update.snb.it/asf] I am using for
> > some
> > > > time and I would like
> > > > to make it public, what are next steps ?
> > > >
> > > >  Giovanni
> > > >
> >
Index: checkSAupdateMirrors.sh
===================================================================
--- checkSAupdateMirrors.sh     (revision 1883632)
+++ checkSAupdateMirrors.sh     (working copy)
@@ -40,9 +40,10 @@
 while read URL; do
   TRY=0
   DOMAIN=`echo $URL | awk -F '/' '{print $3}'`
+  SUBDIR=`echo $URL | awk -F '/' '{print $4}'`
   dig +short $DOMAIN | grep -v "\.$" > $TMP/${DOMAIN}.txt
   while read IP; do
-    URLIP="http://$IP/";
+    URLIP=`echo "http://$IP/$SUBDIR/"; | sed -e 's,//$,/,'`
     while [[ "$TRY" -lt "$RETRIES" ]]; do
       ((TRY++))
       /usr/bin/curl -m $TIMEOUT -s -S -H "Host: $DOMAIN" $URLIP > 
$TMP/${DOMAIN}.out 2>&1

Attachment: signature.asc
Description: PGP signature

Reply via email to