I need a program that checks a directory for new directories being written to it (inotify). When a new dir has been written it should spawn a child process that makes a torrent of it, upload the torrent to a tracker and the wget it down again.
It needs to:
Check the dir for new dirs (inotify) as a daemon I suppose?
When the above occurs, spawn child proc that ->
mktorrent -a blabla -p -v $newdirsname/
Send a post to the trackers [url removed, login to view] (wput? curl -d?) with all necessary info (the exakt format of the string to send will be provided)
wget the file (this part isn't as hard as we can predict the url)
return exit code to parent
Settings should be read from a text file.
Several child procs should be able to spawn simultaneous (the number of child procs should be configurable)
Full commented source is expected.
Python, Perl, C/C++ or whatever is acceptable. Please state in your bid what you expect to use.