nixos/ddclient: don't chown secrets until dynamicuser issue is resolved
revert if https://github.com/NixOS/nixpkgs/pull/154928 or a similar fix gets applied
This commit is contained in:
parent
2b053bc2c1
commit
63971d1fda
@ -29,9 +29,9 @@ let
|
||||
configFile = if (cfg.configFile != null) then cfg.configFile else configFile';
|
||||
|
||||
preStart = ''
|
||||
install --owner ddclient -m600 ${configFile} /run/${RuntimeDirectory}/ddclient.conf
|
||||
install ${configFile} /run/${RuntimeDirectory}/ddclient.conf
|
||||
${lib.optionalString (cfg.configFile == null) (if (cfg.protocol == "nsupdate") then ''
|
||||
install --owner ddclient -m600 ${cfg.passwordFile} /run/${RuntimeDirectory}/ddclient.key
|
||||
install ${cfg.passwordFile} /run/${RuntimeDirectory}/ddclient.key
|
||||
'' else if (cfg.passwordFile != null) then ''
|
||||
password=$(printf "%q" "$(head -n 1 "${cfg.passwordFile}")")
|
||||
sed -i "s|^password=$|password=$password|" /run/${RuntimeDirectory}/ddclient.conf
|
||||
|
Loading…
Reference in New Issue
Block a user