0
這個shell腳本應該添加一切放在文件夾中傳輸。有一個文件夾工作正常,但是當我在同一時間添加多個然後一個文件夾時,它會忽略第二個文件夾。inotifywait添加多個文件
while true;
do
file=$(inotifywait -e moved_to --format %f /srv/watchfolderfilme)
file="/srv/watchfolderfilme/$file"
transmission-create -o $file.torrent -s 16384 -t http://0.0.0.0:6969/announce $file
mv $file /srv/downloads
chmod 0777 $file.torrent
cp $file.torrent /srv/newtorrentfiles
mv $file.torrent /srv/watchfoldertorrents
done