r268 - in html/trunk: . scripts

Roel Neefs rneefs at telenet.be
Tue Jun 14 12:44:06 PDT 2005


On Tuesday 14 June 2005 19:42, jhuntwork at linuxfromscratch.org wrote:

> Added: html/trunk/scripts/lfs-ftp-rsync.sh
> ===================================================================
> --- html/trunk/scripts/lfs-ftp-rsync.sh	2005-06-14 17:36:28 UTC (rev
> 267) +++ html/trunk/scripts/lfs-ftp-rsync.sh	2005-06-14 17:42:07 UTC
> (rev 268) @@ -0,0 +1,27 @@
> +#!/bin/sh
> +# This script rsyncs a directory with a server and will log and mail
> the +# output to a user.
> +# Parameters are needed in this order:
> +
> +NAME="LFS ftp archive"
> +SITE=rsync.osuosl.org
> +MODULE=lfs
> +LOCAL=/local/path/
> +LOG=/path/to/logfile
> +USER=root
> +MAILER=/usr/bin/your_favorite_mailer
> +
> +OUTPUT=`rsync -clprtz --delete ${SITE}::${MODULE} ${LOCAL} 2>&1`
> +
> +if [ $? = 0 ]
> +then
> +    echo "Subject: rsync of ${NAME} on igwe.vub.ac.be OK" |${MAILER}
> +${USER};
> +    echo "Rsync succeeded of ${NAME} on" `date` >> ${LOG}
> +else
> +    (echo "Subject: rsync of ${NAME} on igwe.vub.ac.be FAILED"; echo
> -e "${OUTPUT}") |${MAILER} ${USER}; +    echo "Rsync failed of
> ${NAME} on" `date` >> ${LOG};
> +    echo -e "${OUTPUT}" >> ${LOG}
> +fi
> +
> +

This is quite funny, did anyone look at the script? It still uses my 
logging comment, which outputs igwe.vub.ac.be as the server it's 
rsyncing on, as that was the one i used. I forgot to change this when i 
put it online, and apparently it's still like that. :)
The comment at the top is also wrong, as it talks about parameters to 
the script, while they are set manually.


-- 
	Roel Neefs



More information about the website mailing list