Help - Search - Members - Calendar
Full Version: Is There A Way....
Linuxhelp > Support > Technical Support
.. to send out a messgae when a directory gets written to? I have basically setup a "torrent server", whereby users on the network have a mapped share to the machine, they stick the torrent in the torrent directory, it queues it, downloads it, and then once finished moves the completed file to a directory called "complete". I would like a small app which detects when that directory is written to(ie when a torrent completes) and broadcasts a messgae telling all users this. Sounds a little ambitious perhaps, but would be a good thing to learn IMO.
It should be possible with a shell script. But I couldn't tell you where to start. Sorry, but I just thought you might like to hear it from somebody that it should be possible.

Just as a thought, would it be possible to embed it into the script that moves it to the complete directory?
I would think Jim is right ... you can probably use the script that copies the file to the final destination to generate a message if it copies a file. What is coping the files to the final destination.

A problem would be how to send that message to users. Do you need to send the message via e-mail to remote users ... or locally on a network.

If a local netowrk, are the clients on Linux or Windows machines? If Windows users, are they in a Domain (NT or ADS) or a workgroup ... and are they all in the same domain or workgroup?
Your quite right actually, it may be possible to embed it in the script to move the files, however it is programmed in Java(not by myself) and I really dont know enough about java to recode and recompile it!
The only people who need to know that something has downloaded are people on my local network. The machines are all Winblows machines and are on a workgroup named LAWSON. Hope this helps!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.