subdomain_destroy_post.sh not running

sinuous

Verified User
Joined
Feb 5, 2005
Messages
5
Location
Christchurch NZ
I have created domain_create_post.sh and domain_destroy_post.sh and they are running fine but I am having some issues with my subdomain scripts.

1) subdomain_destroy_post.sh script is not being executed at all. I have double checked all file names and permissions and can see no reason why this script is not being executed when a subdomain is deleted.

2) The subdomain_create_post.sh script runs fine and makes the required changes to httpd.conf but the file is overwritten after it runs. Is there anything I can do here? I tried the dns_write_post.sh script but it seems to be run before the create script so is not suitable either. I am aware of the custom httpd field in the control panel and that is not suitable for my needs - basically what i need to do is write changes to httpd.conf after DA has made any changes to it.

Can anyone confirm if they have had the same issues and any possible work arounds.

cheers,
Joshua
 
Since DirectAdmin overwrites the configuration files you can't make any changes you your script. You might want to drop DA a line and ask them if there's any workaround, or someway to disable DA from overwriting all the config unless specifically asked to do so.
 
I've been looking into this issue more and it looks like DA is a bit unpredictable as to when it overwrites the httpd.conf files. It's hard to find out too much about it but I think it was overwriting some httpd.conf files when we had changed nothing for that user - most frustrating so I am looking at other work arounds which don't require custom changes to the httpd.conf.

The only way forward I can see with custom edits to httpd.conf is to chmod a-w and hope that DA won't chmod it back - then to open up write access only when the custom scripts are running. I think it would get messy though and it's a method of last resort.

I'll look into other work arounds but I was still quite surprised that one of the custom scripts wasn't being run at all. I wanted to check if anyone else had had that problem before reporting it to DA as a bug as I might have missed something on our setup.
 
I believe that DA runs as root when it changes files. If it does, neither attributes nor ownership will stop it. Setting the immutable switch might.

I don't know if DA will continue to work, or report an error, or crash. You might want to try it.

Jeff
 
Back
Top