kolla-ansible/docker/mongodb/extend_start.sh
Hui Kang ef24d9e597 Set mongodb log file to shared volume by heka
TrivialFix

Change-Id: I085ef2884749bb4ecc546b78052a5688e8b36ad3
2016-03-04 11:04:23 -05:00

19 lines
465 B
Bash

#!/bin/bash
echo "run extended start"
if [[ ! -d "/var/log/kolla/mongodb" ]]; then
mkdir -p /var/log/kolla/mongodb
fi
if [[ $(stat -c %a /var/log/kolla/mongodb) != "755" ]]; then
chmod 755 /var/log/kolla/mongodb
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 mongodb: /var/lib/mongodb/
exit 0
fi