From 9eb89a03abe45003d932da8e027a8b44e162e7d2 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 8 Apr 2024 23:10:59 +0200 Subject: [PATCH] fix(radius): Don't lose our shit when copying files --- machines/vault01/k-radius/module.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/machines/vault01/k-radius/module.nix b/machines/vault01/k-radius/module.nix index 70173c1..060f142 100644 --- a/machines/vault01/k-radius/module.nix +++ b/machines/vault01/k-radius/module.nix @@ -106,8 +106,10 @@ in wants = [ "network.target" ]; preStart = '' - cp -R ${cfg.freeradius}/etc/raddb/* ${cfg.configDir} - cp -R ${rlm_python}/etc/raddb/* ${cfg.configDir} + mkdir -p ${cfg.configDir} + + cp -R --no-preserve=mode ${cfg.freeradius}/etc/raddb/* ${cfg.configDir} + cp -R --no-preserve=mode ${rlm_python}/etc/raddb/* ${cfg.configDir} chmod -R u+w ${cfg.configDir}