From 6dc3b0d5a376c484c416804b6ba3a76e95e1cca9 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 13 Oct 2020 15:18:02 -0400 Subject: [PATCH] Watch a different directory for incrond actions by default This should help with #424 by switching the watched directories to a sub-directory of /run/alternc. There are many other scripts create and handle files in the /run/alternc that were causing incrond to start up quite often. --- debian/alternc.postinst | 5 +++-- etc/incron.d/alternc_do_action | 2 +- etc/incron.d/alternc_update_domains | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 50f667e6..337f1c50 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -114,10 +114,10 @@ SQLBACKUP_OVERWRITE="" ALTERNC_SLAVES="" # File to look at for forced launch of update_domain (use incron) -INOTIFY_UPDATE_DOMAIN="/run/alternc/inotify_update_domain.lock" +INOTIFY_UPDATE_DOMAIN="/run/alternc/incron/inotify_update_domain.lock" # File to look at for forced launch of do_actions (use incron) -INOTIFY_DO_ACTION="/run/alternc/inotify_do_action.lock" +INOTIFY_DO_ACTION="/run/alternc/incron/inotify_do_action.lock" # AlternC Locations ALTERNC_HTML="" @@ -273,6 +273,7 @@ NFS_QUOTA=no" >> $CONFIGFILE apparmor_parser -r -T -W "usr.sbin.named" || true fi fi + mkdir -p /run/alternc/incron && chown alterncpanel::alterncpanel /run/alternc/incron touch /run/alternc/refresh_slave /usr/lib/alternc/slave_dns diff --git a/etc/incron.d/alternc_do_action b/etc/incron.d/alternc_do_action index bb8fcca1..3bc051fb 100644 --- a/etc/incron.d/alternc_do_action +++ b/etc/incron.d/alternc_do_action @@ -1 +1 @@ -/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_do_actions.sh +/run/alternc/incron/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_do_actions.sh diff --git a/etc/incron.d/alternc_update_domains b/etc/incron.d/alternc_update_domains index 6188c1a0..7a71ec80 100644 --- a/etc/incron.d/alternc_update_domains +++ b/etc/incron.d/alternc_update_domains @@ -1 +1 @@ -/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh +/run/alternc/incron/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh