I am banging my head off my desk trying to figure this out
I am trying to fire a gpio pin or script on upload of a picture to a remote FTP directory that I have mounted as on the HA server
I have tried inotifyutils and it does not see the upload event in the ftp directory, if I touch a file there, scripts fire, delete same thing, just not upload or any action take by ftp
So i figured I would script the ftp server to fire a rest call to a generic sensor and create actions from there. Well since this is on my firewall it is using vsftp which does not have this capability. I also cannot just install any packages on the firewall as it is a “controlled” package distribution which has custom packages made for it…
So now back to the HA, does anyone know how I can achieve this?
The trouble with inotify is that it requires the local kernel to tell it about activity. That won’t work for actions on a mounted file system that aren’t performed from the local host.
I’d just write a (shell) script that you call, that walks the contents of that mount point and takes the appropriate actions.