-1

We are running on centos 6.9 Final and vsftpd version 2.2.2 Basically we had some folder which is our FTP folder that connected to ANPR/LPR camera. Every camera recognize the plate than the camera will capture image and put it on our ftp which is our folder.

We want to running some python script that every new image added on the directory. How to approach that?

Thanks

Yohanim
  • 157
  • 1
  • 3
  • 10

1 Answers1

0

Take a look at incrond. It listens for signals from kernel to catch file creation/modification/deletion events in some directories and runs scripts whenever that happens.

For example,

/srv/ftp/camera IN_CREATE /usr/local/bin/anpr_lpr_camera_script.sh $#

placed in /etc/incrontab would run /usr/local/bin/anpr_lpr_camera_script.sh for every new file which appears to /srv/ftp/camera folder.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81