Hi everyone.
I'm running samba 3, sharing some of my directories on a local network.
I wanted to do the following:
I have some shares accessible.
Every time somebody access a specific folder or share, I want to run a script.
Like an event handler.
Ex: user DD access share Music
(a connection is established, and I can see it with "smbstatus -v", and log.smbd is updated)
I want: samba then executes script "somescript.sh"
I read the samba howto, but I didn't see anything like that.
Doing smbstatus in a cycle is definitely bad idea (it is cpu hungry, and in a slow cycle it can miss)
Maybe a good idea is syncing with "tail -f /var/log/samba/log.smbd", but it only puts strings on the screen. Dunno how to execute program when new log is appended.
Can somebody help me with this please ?