Configuring use of do_action.php by incron ( same way as update_domains.sh )

This commit is contained in:
Steven Mondji-Lerider 2013-04-24 14:33:49 +00:00
parent dc5400e2fc
commit b3df1b0b2a
4 changed files with 19 additions and 1 deletions

1
.gitattributes vendored
View File

@ -558,6 +558,7 @@ src/fixperms.sh -text
src/functions.sh -text src/functions.sh -text
src/functions_dns.sh -text src/functions_dns.sh -text
src/functions_hosting.sh -text src/functions_hosting.sh -text
src/inotify_do_actions.sh -text
src/inotify_update_domains.sh -text src/inotify_update_domains.sh -text
src/lxc_stopexpired.php -text src/lxc_stopexpired.php -text
src/mail_dodelete.php -text src/mail_dodelete.php -text

View File

@ -119,6 +119,9 @@ ALTERNC_SLAVES=""
# File to look at for forced launch of update_domain (use incron) # File to look at for forced launch of update_domain (use incron)
INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_update_domain.lock" INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_update_domain.lock"
# File to look at for forced launch of do_actions (use incron)
INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_do_action.lock"
# AlternC Locations # AlternC Locations
ALTERNC_HTML="" ALTERNC_HTML=""
ALTERNC_MAIL="" ALTERNC_MAIL=""

View File

@ -1,4 +1,4 @@
# WARNING: Do not edit this file, edit the one in /etc/alternc/templates and launch alternc.install again. # WARNING: Do not edit this file, edit the one in /etc/alternc/templates and launch alternc.install again.
/var/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh /var/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh
/var/run/alternc/inotify_do_action.lock IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/do_actions.php /var/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_do_actions.sh

14
src/inotify_do_actions.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Launch do_actions.php if $INOTIFY_DO_ACTION exist
. /etc/alternc/local.sh
LOGGER="/usr/bin/logger"
if [ -e "$INOTIFY_DO_ACTION" ] ; then
if [ -x "$LOGGER" ] ; then
$LOGGER -t ALTERNC do_actions
fi
/usr/lib/alternc/do_actions.php
fi