Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Combined with a crontab job, looks regularly for torrent files in a f…

…older and start downloads automaticcaly.
  • Loading branch information...
commit 8870de6440301975860aa460db4da037c1457c43 1 parent 11b7e30
@kdeldycke authored
Showing with 22 additions and 0 deletions.
  1. +22 −0
@@ -0,0 +1,22 @@
+# Path of the temporary repository where people upload their torrents file
+# Be sure mldonkey will be able to process files
+chown -R mldonkey:root $P
+# Get the list of all files in the repository
+files=`ls $P`
+# Send each file to mldonkey
+for torrent_name in $files; do
+ tor=$P/$torrent_name
+ # TODO: do url encoding here
+ wget -q -O /dev/null "http://localhost:4080/submit?q=dllink+$tor"
+ # TODO: do not remove if mldonkey doesn't accept the torrent
+ rm -f $tor
+ done
+# Let everybody upload new torrent files to the repository
+chmod -R 666 $P
Please sign in to comment.
Something went wrong with that request. Please try again.