kolla/docker/elasticsearch/extend_start.sh
Christian Berendt 4223fdfbeb Fix log directory of Elasticsearch
Logs should be stored in /var/log/kolla/elasticsearch.

Change-Id: If3ba4ec6ce2dbe9859ca604f0ee2df7fc4d15bd9
Closes-bug: #1634046
2016-10-17 11:34:31 +02:00

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