nixos/usbguard: ensure the audit log file can be created
Since version 0.7.3, usbguard-daemon won't start if the file cannot be opened.
This commit is contained in:
parent
08148a746a
commit
9b9ba8405b
@ -188,7 +188,10 @@ in {
|
||||
wants = [ "systemd-udevd.service" "local-fs.target" ];
|
||||
|
||||
# make sure an empty rule file and required directories exist
|
||||
preStart = ''mkdir -p $(dirname "${cfg.ruleFile}") "${cfg.IPCAccessControlFiles}" && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})'';
|
||||
preStart = ''
|
||||
mkdir -p $(dirname "${cfg.ruleFile}") $(dirname "${cfg.auditFilePath}") "${cfg.IPCAccessControlFiles}" \
|
||||
&& ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
Loading…
Reference in New Issue
Block a user