custombuild and custom hook post script

ccto

Verified User
Joined
Feb 24, 2005
Messages
285
Location
Hong Kong
Hello All,

I tried to put a file - /usr/local/directadmin/custombuild/custom/hooks/modsecurity_rules/post/xxxx.sh (owned by root.root , permission 750) . My script will update /etc/modsecurity.d/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.my.conf automatically after modsecurity rule updates.

If I run "da build modsecurity_rules" , the above hook post script worked fine.

If I run "da build update_versions" , it includes modsecurity_rules update, however, the above hook script did not run.

Is it expected?

Thank you
Regards
George
 
yes, it still trigger the hook only from the main command input, child process won't trigger any hooks at all.
 
Hello,

If I run "da build update_versions" , it includes modsecurity_rules update, however, the above hook script did not run.

Copy your hook to /usr/local/directadmin/custombuild/custom/hooks/update_versions/post/xxxx.sh

Or use symlinks for folders. Do not symlink xxxx.sh, as Directadmin won't see such a script.
 
Back
Top