How to run command after ./build rewrite_confs

JimDeadlock

Verified User
Joined
Mar 11, 2023
Messages
11
I want the ./build rewrite_confs process to chmod a directory after it has completed everything else it does. Is there a way to set this so I don't have to do it manually all the time?
 
Take a look at;

 
I can't get that to work...

I created an executable script:

/usr/local/directadmin/custombuild/custom/hooks/rewrite_confs/post/myscript

...containing:

#!/bin/bash

chmod o+rx /path/to/mydir

I tested the script to make sure it works, then ran ./build rewrite_confs - which updates stuff as usual, but does not run my script. I'm fairly new to DA so there may be something I'm missing.
 
you need "pre" hook script.


exit 1; # for break script
exit 0; # for continue running command.
 
But I want my script to run AFTER ./build rewrite_confs has finished, not before. That tutorial says you can have a 'pre' or a 'post' directory.
 
Sorry, I just reading your post #3 with skip some words.

Could you re-name your script to "myscript.sh"
and use "chmod +x myscript.sh"
 
I tried that, doesn't make any difference - as I said, the script itself works fine with or without the .sh, I've tested it to make sure.
 
Back
Top