blob: e9495c0629325df4dcad575d514fc0adacb79b08 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Srikanth Vavilapalli31713602017-03-03 00:50:18 +000017#!/bin/sh
18
19if [ ! -z "$RABBIT_TRANSPORT_URL" ]; then
20 sed -r -i "s,[#]*(transport_url) = (.*),\1 = $RABBIT_TRANSPORT_URL,g" /etc/ceilometer/ceilometer.conf
21fi
22if [ ! -z "$RABBIT_HOST" ]; then
23 sed -r -i "s/[#]*(rabbit_host) = (.*)/\1 = $RABBIT_HOST/g" /etc/ceilometer/ceilometer.conf
24fi
25if [ ! -z "$RABBIT_USER" ]; then
26 sed -r -i "s/[#]*(rabbit_userid) = (.*)/\1 = $RABBIT_USER/g" /etc/ceilometer/ceilometer.conf
27fi
28if [ ! -z "$RABBIT_PASS" ]; then
29 sed -r -i "s/[#]*(rabbit_password) = (.*)/\1 = $RABBIT_PASS/g" /etc/ceilometer/ceilometer.conf
30fi
31
32#Run ceilometer-agent-notification
33/usr/local/bin/ceilometer-agent-notification