named_action_post.sh & taskq_dns_post.sh

Version 1.531

Feature
Finished

Custom scripts which can be created: /usr/local/directadmin/scripts/custom/named_action_post.sh /usr/local/directadmin/scripts/custom/taskq_dns_post.sh ================================= named_action_post.sh If it exists, it will be called anytime DA makes *any* call to the named service. This applies to start, stop, restart, reload, etc.. Varisble passed will be: action=X immediate=0|1 where X is the given action that was just performed. The immediate variable indicates if it's a task.queue action 0, or 1 for immediate reloads, mainly for LetsEncrypt wildcards. This can be used in case you need to trigger something anytime a local change is done on the DA side where named is altered. Usually, you'd just want to do it for the reload action, eg: #!/bin/sh if [ "$action" = "reload" ]; then #do your action. #if error, echo what went wrong and exit non-zero fi exit 0; The exit code does not current affect any code logic, but if you exit with a non-zero result, the output will be saved to: /var/log/directadmin/errortaskq.log if the exist code is 0 AND there is something output, then DA will log it to system.log. So if everything went well, do not output anything, as that would just add more code to the system.log ================================= taskq_dns_post.sh If the taskq_dns_post.sh exists, it will be called, and all data that was passed to the task.queue for the: action=dns&do=add... action=dns&do=delete... style calls, will also be passed to this script. The exit code behavior is the same as named_action_post.sh. If all goes well, exit 0. Any issue echo some text and exit non-zero.

Interested to try DirectAdmin? Get a 30-day Free Trial!