nixos/opensearch: check plugins directory exists before checking content

This commit is contained in:
Soner Sayakci 2023-11-30 19:09:11 +01:00
parent a984acd894
commit 87b3a98c36
No known key found for this signature in database

View File

@ -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