mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 19:44:09 +00:00
Merge pull request #265193 from 0z13/opensearch-module-link-plugins
nixos/opensearch: link plugins from opensearch package
This commit is contained in:
commit
54f00576aa
@ -72,6 +72,18 @@ in
|
||||
The port to listen on for transport traffic.
|
||||
'';
|
||||
};
|
||||
|
||||
options."plugins.security.disabled" = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc ''
|
||||
Whether to enable the security plugin,
|
||||
`plugins.security.ssl.transport.keystore_filepath` or
|
||||
`plugins.security.ssl.transport.server.pemcert_filepath` and
|
||||
`plugins.security.ssl.transport.client.pemcert_filepath`
|
||||
must be set for this plugin to be enabled.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
default = {};
|
||||
@ -186,6 +198,13 @@ in
|
||||
shopt -s inherit_errexit
|
||||
|
||||
# Install plugins
|
||||
|
||||
# remove plugins directory if it is empty.
|
||||
if [ -z "$(ls -A ${cfg.dataDir}/plugins)" ]; then
|
||||
rm -r "${cfg.dataDir}/plugins"
|
||||
fi
|
||||
|
||||
ln -sfT "${cfg.package}/plugins" "${cfg.dataDir}/plugins"
|
||||
ln -sfT ${cfg.package}/lib ${cfg.dataDir}/lib
|
||||
ln -sfT ${cfg.package}/modules ${cfg.dataDir}/modules
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user