Skip to content
Snippets Groups Projects
Commit 03da3a80 authored by Star Brilliant's avatar Star Brilliant
Browse files

When systemd service fail to start, use an exponential backoff delay to restart it

This solves an issue that on (at least) Fedora and if NetworkManager starts too slow, systemd may stop trying to start it.
parent f13dea39
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,10 @@ AmbientCapabilities=CAP_NET_BIND_SERVICE ...@@ -10,7 +10,10 @@ AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/usr/local/bin/doh-client -conf /etc/dns-over-https/doh-client.conf ExecStart=/usr/local/bin/doh-client -conf /etc/dns-over-https/doh-client.conf
LimitNOFILE=1048576 LimitNOFILE=1048576
Restart=always Restart=always
RestartSec=3 RestartSec=1s
RestartMaxDelaySec=76s
RestartSteps=9
StartLimitIntervalSec=0
Type=simple Type=simple
DynamicUser=yes DynamicUser=yes
......
...@@ -8,7 +8,10 @@ AmbientCapabilities=CAP_NET_BIND_SERVICE ...@@ -8,7 +8,10 @@ AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/usr/local/bin/doh-server -conf /etc/dns-over-https/doh-server.conf ExecStart=/usr/local/bin/doh-server -conf /etc/dns-over-https/doh-server.conf
LimitNOFILE=1048576 LimitNOFILE=1048576
Restart=always Restart=always
RestartSec=3 RestartSec=1s
RestartMaxDelaySec=76s
RestartSteps=9
StartLimitIntervalSec=0
Type=simple Type=simple
DynamicUser=yes DynamicUser=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment