Skip to content

Commit

Permalink
ddclient: Make verbose logging deactivatable.
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon authored and rycee committed Mar 7, 2017
1 parent ac0021c commit 0bd211d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion nixos/modules/services/networking/ddclient.nix
Expand Up @@ -7,7 +7,7 @@ let

stateDir = "/var/spool/ddclient";
ddclientUser = "ddclient";
ddclientFlags = "-foreground -verbose -noquiet -file ${config.services.ddclient.configFile}";
ddclientFlags = "-foreground -file ${config.services.ddclient.configFile}";
ddclientPIDFile = "${stateDir}/ddclient.pid";

in
Expand Down Expand Up @@ -102,6 +102,22 @@ in
Method to determine the IP address to send to the dynamic DNS provider.
'';
};

verbose = mkOption {
default = true;
type = bool;
description = ''
Print verbose information.
'';
};

quiet = mkOption {
default = false;
type = bool;
description = ''
Print no messages for unnecessary updates.
'';
};
};
};

Expand Down Expand Up @@ -136,6 +152,8 @@ in
lib.optionalString (server != "") "server=${server}"}
ssl=${if config.services.ddclient.ssl then "yes" else "no"}
wildcard=YES
quiet=${if config.services.ddclient.quiet then "yes" else "no"}
verbose=${if config.services.ddclient.verbose then "yes" else "no"}
${config.services.ddclient.domain}
${config.services.ddclient.extraConfig}
'';
Expand Down

0 comments on commit 0bd211d

Please sign in to comment.