Order of custombuild post hooks

sparek

Verified User
Joined
Jun 27, 2019
Messages
531
How does Custombuild determine the order for executing post event hooks.

For exim_conf, I have several post hook events that are triggered, but they need to go in order. I prepended the file names with numeric digits to try to get them to work in order, but that doesn't seem to be the case:

Executing '/usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/900_exim_conf_post.sh'...
Executing '/usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/101_disable_auth_sending_spoof.sh'...
Executing '/usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/999_reload_exim.sh'...
Executing '/usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/100_log_selector.sh'...


Shouldn't these execute as 100, 101, 900, and then 999?

What naming convention needs to be used to insure that hooks execute in order?
 
I've encountered the same: hook 90-script.sh running before hook 10-script.sh

In fact: I've had trouble getting more than one hook script to run, so after script 90-script.sh it stops and script 10-script.sh never runs.

These are "post" hooks on a Debian 11 server.
 
Last edited:
Use one hook then /usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/custom_hook.sh which would scan a custom folder and run hooks in any desired order /usr/local/directadmin/custombuild/custom_hooks/*.sh. Just an idea for you to develop further.
 
Yes, I've already converted to using one hook script that runs my actions in the desired order.

Manual is unclear on multiple scripts support but using pre/post folders for the hooks for me suggests it's possible (and older versions of the build script had support for this in the code).
 
Back
Top