Ariën Huisken wrote:
> Hi list,
> 
> I have a smb share where users can put images. These images have to be 
> converted (imagemagick) and I have a script to do this on the server. 
> The script converts the images to another directory and deletes the 
> original.
> 
> Now my question is how can I run the script when the file is completely 
> received or how to monitor when new files have been added to this share 
> so I can run the script as a sort of a daemon (like a queue)?

here is an extract from a script I use to build src.rpms from an upload
automatically;


if [ -n "`ls incoming/`" ]; then
  for srcrpm in incoming/*.src.rpm; do
    if [ -f $srcrpm -a -z "`lsof $srcrpm 2>/dev/null`" ]; then
      echo -n "$srcrpm "
      ...
    fi
  done
fi

-- 
Cheers,
Morten
:wq
_______________________________________________
tsl-discuss mailing list
[email protected]
http://lists.trustix.org/mailman/listinfo/tsl-discuss

Reply via email to