Trigger script on removing domain

Hi there,

I am playing around this HestiaCP, learning how all it’s interactions work.

I have created templates to create DNS. Using external DNS, and utilize rndc to synchronize the data which is working perfectly fine. What I am trying to figure out now is when a domain is removed, is there a trigger script that can be called, so i can delete the zone? I’ve been searching on here, and looking quickly at the code base and I can’t seem to find any template-based approach to do it.

I am hoping I am simply missing something very obvious, otherwise how could I go about this approach without having to call additional commands (I prefer not to involve external calls, but if that is the only option I will have to look into it.)

Hi,

No, unfortunately there isn’t a trigger/hook when removing a web domain.

Damn, that’s a shame.

OK, I am looking into making custom v- commands (I wish it supported something like override.d/ like rspam)

So far I have made 3 v-delete-user-a, v-delete-dns-domains-a, v-delete-dns-domain-a. Running these commands from the cli work as intended.

I added this commands into the data/api/<access_key>, but when i try to call these commands via the /API/ I get “failed to login”

Am i missing a step to allowing these commands to be usable via the API?

Disregard the above, my linux-ness made to automatically add .sh to those filenames.

API is working as intended.

1 Like