ddclient: Make verbose logging deactivatable.

This commit is contained in:
Daniel Ehlers 2017-03-06 16:41:02 +01:00 committed by Robert Helgesson
parent ac0021ce53
commit 0bd211d84f
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -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
@ -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.
'';
};
};
};
@ -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}
'';