diff options
author | Soner Sayakci <s.sayakci@shopware.com> | 2023-11-30 19:09:11 +0100 |
---|---|---|
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-12-01 05:34:34 +0000 |
commit | e5e1e750ded4cbc6cf987f6915c5ed9348263726 (patch) | |
tree | aa5ab9b3b8fb7b002a1200ce7901b556f3695a76 /nixos/modules | |
parent | 5de0b32be6e85dc1a9404c75131316e4ffbc634c (diff) |
nixos/opensearch: check plugins directory exists before checking content
(cherry picked from commit 87b3a98c36607596f9c4fc1fa5d51ffd9b12894f)
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/search/opensearch.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/search/opensearch.nix b/nixos/modules/services/search/opensearch.nix index ae79d5545fd76..50b3c3bc19421 100644 --- a/nixos/modules/services/search/opensearch.nix +++ b/nixos/modules/services/search/opensearch.nix @@ -200,7 +200,7 @@ in # Install plugins # remove plugins directory if it is empty. - if [ -z "$(ls -A ${cfg.dataDir}/plugins)" ]; then + if [[ -d ${cfg.dataDir}/plugins && -z "$(ls -A ${cfg.dataDir}/plugins)" ]]; then rm -r "${cfg.dataDir}/plugins" fi |