TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.83k stars 399 forks source link

[Feature Request] systemctl reload dns.service #869

Closed micush closed 3 months ago

micush commented 4 months ago

Hi Shreyas,

It's my understanding that on Linux there's a difference between 'systemctl reload' and 'systemctl restart'. Apparently 'systemctl reload' just reloads the app config without restarting the app while 'systemctl restart' restarts the whole app.

It's possible to implement 'systemctl reload dns.service'? Currently:

systemctl reload dns.service
Failed to reload dns.service: Job type reload is not applicable for unit dns.service.

Regards,

Michael

ShreyasZare commented 4 months ago

Thanks for the post. The reload option is not supported since the DNS server does not expect user to update the config files manually. The config is updated only via HTTP API and is automatically loaded without need to restart the DNS server.

micush commented 4 months ago

Hi,

If not from the service definition then, is their any way to do this via an API call?

Regards,

Michael

ShreyasZare commented 4 months ago

If not from the service definition then, is their any way to do this via an API call?

If you have config files that you need to reload then you can use the Restore Settings option fro GUI or the HTTP API call for it. You will need to prepare a zip file which will contain the relevant config file you wish to overwrite and use that zip file with the restore operation. The DNS server will replace the config files from the zip and reload them without restarting the service.

Let me know if that helps.