[kibana] symlink to the kibana executable under /opt/ (debian)

Kolla-ansible expects for /opt/kibana/bin/kibana to exists as
the default path location, centos/redhat distros have this location
set, so it would be desirable for debian to at least have a symlink
to the executable under the /opt path.

Closes-Bug: #1772750

Change-Id: I1034ecb1d909dcc357ffa904569ca7c8358386b1
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@linaro.org>
This commit is contained in:
Jorge Niedbalski 2018-05-22 17:45:52 -04:00
parent 000159cb6d
commit ebf343e3ce

View File

@ -1,6 +1,13 @@
#!/bin/bash #!/bin/bash
KIBANA_LOG_DIR="/var/log/kolla/kibana" KIBANA_LOG_DIR="/var/log/kolla/kibana"
KIBANA_DEFAULT_EXECUTABLE="/opt/kibana/bin/kibana"
# (niedbalski): debian installs under /usr/share, so lets create
# a symlink to the common executable location see LP #1772750.
if [[ ! -e ${KIBANA_DEFAULT_EXECUTABLE} ]] && [[ -f /usr/share/kibana/bin/kibana ]]; then
mkdir -p $(dirname ${KIBANA_DEFAULT_EXECUTABLE}) && ln -s /usr/share/kibana/bin/kibana ${KIBANA_DEFAULT_EXECUTABLE}
fi
if [[ ! -d "${KIBANA_LOG_DIR}" ]]; then if [[ ! -d "${KIBANA_LOG_DIR}" ]]; then
mkdir -p "${KIBANA_LOG_DIR}" mkdir -p "${KIBANA_LOG_DIR}"