modules(acme-dns): use systemd for statedir

This commit is contained in:
Raito Bezarius 2021-07-24 23:22:41 +02:00
parent a598c892f5
commit 2ed18d1a98

View file

@ -97,15 +97,11 @@ in
serviceConfig = { serviceConfig = {
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
DynamicUser = true; DynamicUser = true;
BindPaths = [ cfg.stateDir ]; StateDirectory = "acme-dns";
ExecStart = "${cfg.package}/bin/acme-dns -d -c ${configFile}"; ExecStart = "${cfg.package}/bin/acme-dns -d -c ${configFile}";
Restart = "always"; Restart = "always";
RestartSec = "4s"; RestartSec = "4s";
}; };
preStart = ''
mkdir -p ${cfg.stateDir}
'';
}; };
}; };
} }