nixos/opensearch: check plugins directory exists before checking content
This commit is contained in:
parent
a984acd894
commit
87b3a98c36
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user