Author: arekm                        Date: Thu Mar 10 07:39:17 2011 GMT
Module: buildlogs                     Tag: HEAD
---- Log message:
inotify watcher; now buildlogs appear instantly on web

---- Files affected:
buildlogs/helpers:
   buildlogs-inotify-mover.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: buildlogs/helpers/buildlogs-inotify-mover.sh
diff -u /dev/null buildlogs/helpers/buildlogs-inotify-mover.sh:1.1
--- /dev/null   Thu Mar 10 08:39:17 2011
+++ buildlogs/helpers/buildlogs-inotify-mover.sh        Thu Mar 10 08:39:12 2011
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+root="/home/services/ftpd/buildlogs"
+
+if test -f /etc/buildlogs-mover.conf ; then
+       . /etc/buildlogs-mover.conf
+fi
+
+
+inotifywait -q -m -r -e move $root/*/*/.new | \
+        while read path change file; do
+                [ "$change" != "MOVED_TO" ] && continue
+                /bin/su - ftp -s /bin/sh -c 
"/home/services/buildlogs/buildlogs-mover.sh"
+        done
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to