AILY
AILY

Reputation: 377

filewatch on Openshift PVC linked to NFS

I have a shared PVC linked to an NFS, Team 1 puts file in the NFS and i can see these files from my pod. i tried inotify, watchman and watchexec to trigger some action (copy) when file are put in my PVC. but my scripts with the solutions mentionned above doesn't detect these files( because event are triggered on a different OS). this is the script i'm currently using. what am i doing wrong ? are there any solution for this kind of use case.

   #!/bin/bash
   src_dir="/usr/app/workspace/import/"
   dest_dir="/usr/app/workspace/export/"
   while true; do
      watchexec -- rsync -avhP -O --include="filename*" --exclude='*' $src_dir $dest_dir
   done

Upvotes: 0

Views: 64

Answers (0)

Related Questions