mirror of
https://github.com/TechnitiumSoftware/DnsServer.git
synced 2026-03-02 23:15:13 +00:00
Adds a handler for the SIGTERM signal on Linux and macOS to allow the DNS server to shut down gracefully. This is the standard signal sent by `systemd` and Docker to stop a service. - Updated `DnsServerApp/Program.cs` to handle `PosixSignal.SIGTERM`. - Removed `KillSignal=SIGINT` from `systemd.service` to use the default `SIGTERM`. - Removed `STOPSIGNAL SIGINT` from `Dockerfile` to use the default `SIGTERM`. This ensures that the application has a chance to clean up resources properly before exiting when stopped as a service or container.
14 lines
322 B
Desktop File
14 lines
322 B
Desktop File
[Unit]
|
|
Description=Technitium DNS Server
|
|
|
|
[Service]
|
|
WorkingDirectory=/opt/technitium/dns
|
|
ExecStart=/usr/bin/dotnet /opt/technitium/dns/DnsServerApp.dll /etc/dns
|
|
Restart=always
|
|
# Restart service after 10 seconds if the dotnet service crashes:
|
|
RestartSec=10
|
|
SyslogIdentifier=dns-server
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|