On 13-Mar-2003/08:55 -0500, "Douglas, Stuart" <[EMAIL PROTECTED]> wrote:
>I was hoping to find a way to do this directly via an ftp daemon, but it
>looks like I'll need an external program.  I want to find a way to have
>my ftp server watch a specific directory for any new file uploads and
>send an e-mail to a specified account when any occur.  Anyone have any
>ideas on how this might best be done?

What about a cronjob that does this:

olddirsum=`cat olddirsum`
newdirsum=`ls --full-time /ftpdir | md5sum`
if [ "$newdirsum" != "$olddirsum" ]; then
  ls /dir | mail -s 'Updated FTP Directory' [EMAIL PROTECTED]
  echo "$newdirsum" > olddirsum
fi


Tony
-- 
Anthony E. Greene <mailto:[EMAIL PROTECTED]>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.pobox.com/~agreene/>
Linux. The choice of a GNU generation <http://www.linux.org/>



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to