mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
nixos/ddclient: support all special characters in password
(cherry picked from commit f0bd0f3e4c)
This commit is contained in:
committed by
Bjørn Forsman
parent
af780ad9aa
commit
9c7491d3cf
@@ -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
|
||||
'')}
|
||||
|
||||
Reference in New Issue
Block a user