When using the watchman trigger functionality does anyone know how to get the name of the user responsible for the trigger?
What I am trying to do, is to version data files automatically to a local git. For this I am watching a folder and executing a trigger whenever a file is changed (added, deleted or modified). This triggers a script which then performs a git add and git commit.
What I did:
watchman watch /data
watchman -- trigger /data git-commit '*' -- sh git_commit.sh
However that performs all commits in my name instead of the user who performed the change.
It seems, this cannot be done in watchman directly. The plan now is to use auditctl for this.