mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/ddclient: support all special characters in password
This commit is contained in:
parent
6bd1daaf0f
commit
d6a4500f88
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ let
|
|||
preStart = ''
|
||||
install ${configFile} /run/${RuntimeDirectory}/ddclient.conf
|
||||
${lib.optionalString (cfg.configFile == null) (if (cfg.passwordFile != null) then ''
|
||||
password=$(head -n 1 ${cfg.passwordFile})
|
||||
sed -i "s/^password=$/password=$password/" /run/${RuntimeDirectory}/ddclient.conf
|
||||
password=$(printf "%q" "$(head -n 1 "${cfg.passwordFile}")")
|
||||
sed -i "s|^password=$|password=$password|" /run/${RuntimeDirectory}/ddclient.conf
|
||||
'' else ''
|
||||
sed -i '/^password=$/d' /run/${RuntimeDirectory}/ddclient.conf
|
||||
'')}
|
||||
|
|
Loading…
Reference in a new issue