kolla/docker/placement/placement-base/extend_start.sh
chenxing ba730c029e Fix the permission issue of placement-api log
This patch is committed according to patch[0] of the kolla-ansible.

[0]https://review.openstack.org/#/c/613629/28

Change-Id: Id138802b320ae0a0f01db51a0b5a784c83a72485
2019-03-13 09:25:19 +00:00

16 lines
498 B
Bash

#!/bin/bash
if [[ ! -d "/var/log/kolla/placement" ]]; then
mkdir -p /var/log/kolla/placement
touch /var/log/kolla/placement/placement-api.log
fi
if [[ $(stat -c %U:%G /var/log/kolla/placement) != "placement:kolla" ]]; then
chown -R placement:kolla /var/log/kolla/placement
fi
if [[ $(stat -c %a /var/log/kolla/placement) != "755" ]]; then
chmod 755 /var/log/kolla/placement
chmod 644 /var/log/kolla/placement/placement-api.log
fi
. /usr/local/bin/kolla_placement_extend_start