From 777bd88b9fa2a9bcb38fce716fcc7be67f3ccd9a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 28 Oct 2017 23:36:20 +0200 Subject: More poking --- custom/tinc/def.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/custom/tinc/def.nix b/custom/tinc/def.nix index 2cdf1b01..824877a9 100644 --- a/custom/tinc/def.nix +++ b/custom/tinc/def.nix @@ -140,12 +140,14 @@ in description = "Tinc Daemon - ${network}"; wantedBy = [ "network.target" ]; after = [ "network-interfaces.target" ]; - path = [ data.package ]; restartTriggers = [ config.environment.etc."tinc/${network}/tinc.conf".source ] ++ mapAttrsToList (host: _ : config.environment.etc."tinc/${network}/hosts/${host}".source) data.hosts; serviceConfig = { - Type = "forking"; + Type = "simple"; PIDFile = "/run/tinc.${network}.pid"; + execStart = '' + ${data.package}/bin/tincd -D -L -U tinc.${network} -n ${network} --pidfile /run/tinc.${network}.pid -d ${toString data.debugLevel} + ''; }; preStart = '' ${pkgs.openresolv}/bin/resolvconf -d tinc.${network} || true @@ -162,9 +164,6 @@ in [ -f "/etc/tinc/${network}/rsa_key.priv" ] || tincd -n ${network} -K 4096 fi ''; - script = '' - tincd -L -U tinc.${network} -n ${network} --pidfile /run/tinc.${network}.pid -d ${toString data.debugLevel} - ''; }) ); -- cgit v1.2.3