Skip to content
Browse files

Tool for watching what files are being mirrored

Which is a bit brute force, but I don't use it frequently.
  • Loading branch information...
1 parent c89c071 commit 656ac8611de0d1a42ab84dcee1e320c0908ec1d3 @afresh1 committed Mar 25, 2016
Showing with 16 additions and 0 deletions.
  1. +16 −0 watch_sync
View
16 watch_sync
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. /etc/OpenBSDTorrents.conf
+cd $OBT_DIR_FTP/$OBT_BASENAME
+
+mount_point=`df . | tail -1 | sed -e 's/.* //'`
+while true; do
+ inum=""
+ for i in `fstat -u torrentsync -f $mount_point | cut -c 40-49 | grep -v INUM`; do
+ [ -n "$inum" ] && inum="$inum -o"
+ inum="$inum -inum $i"
+ done
+ [ -n "$inum" ] && find . -type f \( $inum \) -ls
+
+ sleep 10;
+done

0 comments on commit 656ac86

Please sign in to comment.
Something went wrong with that request. Please try again.