diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-07-06 20:42:56 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-07-06 20:42:56 +0200 |
commit | 3464c602e83687954b711bb9b30c5d85303f6f51 (patch) | |
tree | ad661258d691c317f49329f71162d097890577c5 /nixos/modules/services/logging | |
parent | aa2a7e49b82567bad8934cc983f06dd5abc68f49 (diff) | |
download | nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar.gz nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar.bz2 nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar.lz nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar.xz nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.tar.zst nixpkgs-3464c602e83687954b711bb9b30c5d85303f6f51.zip |
nixos/graylog: fix startup
Until now the startup failed with an error like this: ``` com.github.joschi.jadconfig.ValidationException: Parent path /var/lib/graylog/server for Node ID file at /var/lib/graylog/server/node-id is not a directory ``` This happens since `graylog.service` ensures that `/var/lib/graylog` exists, however it doesn't take care of the directory for `cfg.nodeIdFile`.
Diffstat (limited to 'nixos/modules/services/logging')
-rw-r--r-- | nixos/modules/services/logging/graylog.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/services/logging/graylog.nix b/nixos/modules/services/logging/graylog.nix index ee566825498..49f3187fd31 100644 --- a/nixos/modules/services/logging/graylog.nix +++ b/nixos/modules/services/logging/graylog.nix @@ -150,6 +150,9 @@ in rm -rf /var/lib/graylog/plugins || true mkdir -p /var/lib/graylog/plugins -m 755 + mkdir -p "$(dirname ${cfg.nodeIdFile})" + chown -R ${cfg.user} "$(dirname ${cfg.nodeIdFile})" + for declarativeplugin in `ls ${glPlugins}/bin/`; do ln -sf ${glPlugins}/bin/$declarativeplugin /var/lib/graylog/plugins/$declarativeplugin done |