How to trigger events within jail on file creation

I'd like to be able to configure the ability to trigger events within a jail when files are created in specific directories. While I can use auditd and praudit to capture file creation on the host, as far as I know jailed use of that facility isn't possible, even with providing /dev/auditpipe to the jail. (Please let me know if I'm wrong on that.)

https://forums.freebsd.org/threads/53580/ is pretty close to what I'd like to be able to accomplish, but within a jail.

I could run auditd on the host and then use jexec to trigger action within the jail. This, however, makes the jail not easily portable, as it depends on the configuration of the host.

Within the jail, I could run a cron job to check every minute for the file creation, but that's something of a sledgehammer, as these events don't happen very often.

Any other suggestions on how to configure this kind of in-jail watch/trigger?
 
Back
Top