From 5c416e72e89e9ac96f9188ba6af756fb0cb4ba5e Mon Sep 17 00:00:00 2001 From: Mason James Date: Sun, 16 Oct 2022 14:34:03 +1300 Subject: [PATCH] Bug 31729: watch only perl files Content-Type: text/plain; charset="utf-8" --- debian/scripts/koha-watcher | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/debian/scripts/koha-watcher b/debian/scripts/koha-watcher index eac53a0517..954747a12b 100755 --- a/debian/scripts/koha-watcher +++ b/debian/scripts/koha-watcher @@ -54,13 +54,12 @@ elif [ -z $instance ]; then exit fi -while inotifywait --recursive \ - --event MODIFY \ - --syslog \ - --outfile /var/log/koha/$instance/plack-error.log \ - --excludei 'swp$' \ - $dir ; do - kill -s HUP `cat /var/run/koha/$instance/plack.pid` -done +inotifywait --recursive -m --event CLOSE_WRITE $dir | \ + egrep '\.pl$|\.pm$' --line-buffered | \ + while read path events file; + do + echo "$events happened to $file in $path" >> /var/log/koha/$instance/plack-error.log + kill -s HUP `cat /var/run/koha/$instance/plack.pid` + done; -exit 0; +exit 0 -- 2.20.1