nixos/osquery: fix database_path + logger_path opts per systemd docs
nixos/osquery: Update tests with option changes
This commit is contained in:
@@ -63,16 +63,16 @@ in
|
||||
freeformType = attrsOf str;
|
||||
options = {
|
||||
database_path = lib.mkOption {
|
||||
default = "/var/lib/osquery/osquery.db";
|
||||
default = "osquery/osquery.db";
|
||||
readOnly = true;
|
||||
description = "Path used for the database file.";
|
||||
type = path;
|
||||
description = "Path used for the database file, relative to /var/lib/.";
|
||||
type = nonEmptyStr;
|
||||
};
|
||||
logger_path = lib.mkOption {
|
||||
default = "/var/log/osquery";
|
||||
default = "osquery";
|
||||
readOnly = true;
|
||||
description = "Base directory used for logging.";
|
||||
type = path;
|
||||
description = "Base directory used for logging, relative to /var/log/.";
|
||||
type = nonEmptyStr;
|
||||
};
|
||||
pidfile = lib.mkOption {
|
||||
default = "/run/osquery/osqueryd.pid";
|
||||
|
||||
@@ -53,7 +53,7 @@ import ./make-test-python.nix (
|
||||
machine.succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"nullvalue\";' | osqueryi | tee /dev/console | grep -q ${nullvalue}")
|
||||
|
||||
# Module creates directories for default database_path and pidfile flag values.
|
||||
machine.succeed("test -d $(dirname ${cfg.flags.database_path})")
|
||||
machine.succeed("test -d $(dirname /var/lib/${cfg.flags.database_path})")
|
||||
machine.succeed("test -d $(dirname ${cfg.flags.pidfile})")
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user