The installation on my Ubuntu 18.04 (incron 0.5.10, installed from repo) sees changes in specified directories but not in sub-directories. Example config:
The man page suggests that the default behaviour is detect in subdirs, but I did add an explicit "recursive=true". incrond did not complain about my config file, but the behaviour is unchanged.
The output below shows the effects of touching a file in a sub-directory (incron does not fire) and in the watched directory (incron fires). The loaded config is the second example above with "recursive=true":
root@myhost:~# systemctl status incron
? incron.service - file system events scheduler
Loaded: loaded (/lib/systemd/system/incron.service; enabled; vendor preset: enab
Active: active (running) since Fri 2021-02-05 11:35:59 GMT; 1 weeks 0 days ago
Main PID: 30607 (incrond)
Tasks: 1 (limit: 2318)
CGroup: /system.slice/incron.service
+-30607 /usr/sbin/incrond
Feb 12 09:41:13 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:02:09 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:59:18 myhost.mynet incrond[30607]: system table sslproxy.incrontab
root@myhost:~# touch /etc/nginx/sites-available/colintest
root@myhost:~# systemctl status incron
? incron.service - file system events scheduler
Loaded: loaded (/lib/systemd/system/incron.service; enabled; vendor preset: enab
Active: active (running) since Fri 2021-02-05 11:35:59 GMT; 1 weeks 0 days ago
Main PID: 30607 (incrond)
Tasks: 1 (limit: 2318)
CGroup: /system.slice/incron.service
+-30607 /usr/sbin/incrond
Feb 12 09:41:13 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:02:09 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:59:18 myhost.mynet incrond[30607]: system table sslproxy.incrontab
root@myhost:~# touch /etc/nginx/colintest
root@myhost:~# systemctl status incron
? incron.service - file system events scheduler
Loaded: loaded (/lib/systemd/system/incron.service; enabled; vendor preset: enab
Active: active (running) since Fri 2021-02-05 11:35:59 GMT; 1 weeks 0 days ago
Main PID: 30607 (incrond)
Tasks: 1 (limit: 2318)
CGroup: /system.slice/incron.service
+-30607 /usr/sbin/incrond
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:18 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 09:41:21 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:02:09 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
Feb 12 11:59:18 myhost.mynet incrond[30607]: system table sslproxy.incrontab
Feb 12 12:10:16 myhost.mynet incrond[30607]: (system::sslproxy.incrontab) CMD
The installation on my Ubuntu 18.04 (incron 0.5.10, installed from repo) sees changes in specified directories but not in sub-directories. Example config:
The man page suggests that the default behaviour is detect in subdirs, but I did add an explicit "recursive=true". incrond did not complain about my config file, but the behaviour is unchanged.
The output below shows the effects of touching a file in a sub-directory (incron does not fire) and in the watched directory (incron fires). The loaded config is the second example above with "recursive=true":