-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incron "runs" once and then it won't "watch" again #12
Comments
Hi there I've encountered such a problem some time ago. And I find somewhere info that running nested commands is disabled in incrontab for security reasons. But I developed workaround solution.
Example which shows solutions for your problem. Incrontab entry (you can place bash script wherever you want)
Bash scriptYou can set your variables and set all needed conditions when it comes to filename which is tracked.
I hope it will help you. |
And when it comes to this bug it's caused by triggering |
@wiktor2200 Thank you a lot for your effort... +rep to you! :D Thanks & Cheers, |
Same issue here: I'm watching a file for modifications (eg by using I also tried |
I recompiled incron by removing this and any other references about |
I've just run into this issue myself. The key workaround is mentioned by @wiktor2200 here:
So it seems that This bug is quite old, is there any timeline on when it might be fixed? |
Good afternoon. I also see this bug. /home/fly/test/testfile IN_ALL_EVENTS echo "$$ $@ $# $% $& When I edit a file via nano there are no problems.
|
What have i done so far?
I set up my table as followed:
incrontab -e
/folder/.hiddenfolder/file IN_ATTRIB cp /folder/.hiddenfolder/file /folder/.hiddenbackup/$$(date +%Y%m%d)_file
After Accessing my
file
and saving the changes I do get my backup file.On
ls -l /folder/.hiddenbackup/
id shows me my file named:20200208_file
Here comes the tricky part:
Now I access my file again, make some changes and save it but nothing happens.
when I check
service incron status
it showes me, that the service is running and active but no further event happened.Anyclue why and what is going on?
I have tried IN_ATTRIB,IN_ONESHOT ... I've even tried IN_ALL_EVENTS.
When I use IN_ATTRIB only then i get a line in
service incron status
that says:Feb 08 08:48:20 example.com incrond[1116]: PATH (/folder/.hiddenfolder/file) FILE () EVENT (IN_IGNORED)
After
service incron restart
everything works... but only once.Thanks & Cheers,
MaxBenn
The text was updated successfully, but these errors were encountered: