I can't see anything anywhere showing examples of how to use virtual environments with incron http://inotify.aiken.cz/
Does anyone know if this is even possible?
Update: I run incrontab -e I then add this line:
/home/vmail/jobstat.us/submit/new/ IN_CREATE /home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd
However when I try to run the same from the command line i.e.
/home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd
It says
vmail@mail:~$ /home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd
Traceback (most recent call last):
File "/home/vmail/mailtounicodetoarchive.py", line 14, in <module>
me = singleton.SingleInstance()
NameError: name 'singleton' is not defined
Obviously the above error is because it's not actually executing the command in a venv and so the tendo module which I installed in the venv does not work.
Any thoughts on how to get venvs to work with incron?