Skip to content

Commit 016fa06

Browse files
spacekittehgrahamc
authored andcommittedNov 28, 2016
cjdns: Improving systemd unit description
1 parent 880d616 commit 016fa06

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎nixos/modules/services/networking/cjdns.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ in
198198

199199
systemd.services.cjdns = {
200200
description = "cjdns: routing engine designed for security, scalability, speed and ease of use";
201-
wantedBy = [ "multi-user.target" ];
202-
after = [ "network.target" ];
201+
wantedBy = [ "multi-user.target" "sleep.target"];
202+
after = [ "network-online.target" ];
203+
bindsTo = [ "network-online.target" ];
203204

204205
preStart = if cfg.confFile != null then "" else ''
205206
[ -e /etc/cjdns.keys ] && source /etc/cjdns.keys
@@ -235,7 +236,9 @@ in
235236

236237
serviceConfig = {
237238
Type = "forking";
238-
Restart = "on-failure";
239+
Restart = "always";
240+
StartLimitInterval = 0;
241+
RestartSec = 1;
239242
CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_RAW";
240243
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_RAW";
241244
ProtectSystem = "full";

0 commit comments

Comments
 (0)
Please sign in to comment.