4223fdfbeb
Logs should be stored in /var/log/kolla/elasticsearch. Change-Id: If3ba4ec6ce2dbe9859ca604f0ee2df7fc4d15bd9 Closes-bug: #1634046
14 lines
437 B
Bash
14 lines
437 B
Bash
#!/bin/bash
|
|
|
|
if [[ ! -d "/var/log/kolla/elasticsearch" ]]; then
|
|
mkdir -p /var/log/kolla/elasticsearch
|
|
fi
|
|
if [[ $(stat -c %a /var/log/kolla/elasticsearch) != "755" ]]; then
|
|
chmod 755 /var/log/kolla/elasticsearch
|
|
fi
|
|
|
|
# Only update permissions if permissions need to be updated
|
|
if [[ $(stat -c %U:%G /var/lib/elasticsearch/data) != "elasticsearch:elasticsearch" ]]; then
|
|
sudo chown elasticsearch: /var/lib/elasticsearch/data
|
|
fi
|