kolla-ansible/docker/etcd/extend_start.sh
Hui Kang a5b53f3a70 Add etcd ansible role
Change-Id: If8351ab3000006323a05924e907f1e3745768304
Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>>
Partially-implements: bp kuryr-docker-plugin
2016-09-15 03:33:57 +00:00

17 lines
472 B
Bash

#!/bin/bash
# Create log directory, with appropriate permissions
if [[ ! -d "/var/log/kolla/etcd" ]]; then
mkdir -p /var/log/kolla/etcd
fi
if [[ $(stat -c %a /var/log/kolla/etcd) != "755" ]]; then
chmod 755 /var/log/kolla/etcd
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
sudo chown etcd: /var/lib/etcd/
exit 0
fi