I'd like to run a shell script on an FTP server when an FTP user logs off.
Imagine:
- Ftpuser logs in, uploads a file to an inbound-only directory and logs off.
- Ftp Server detects logoff then runs
FileCheckMove.sh FileCheckMove.shchecks/sanitizes any files from inbound-only and moves them to an alternate location.
What's the best way to detect ftp user logoff and initiate the event?
- I've considered simply auto running the script every few minutes, but I don't want to attempt FileCheckMove.sh on a file that's open during its upload to the server.
This is Debian 9 stretch running ProFTPd.