Matteo Scandolo | eb0d11c | 2017-08-08 13:05:26 -0700 | [diff] [blame^] | 1 | |
| 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 Vavilapalli | 3171360 | 2017-03-03 00:50:18 +0000 | [diff] [blame] | 17 | #!/bin/sh |
| 18 | |
| 19 | if [ ! -z "$RABBIT_TRANSPORT_URL" ]; then |
| 20 | sed -r -i "s,[#]*(transport_url) = (.*),\1 = $RABBIT_TRANSPORT_URL,g" /etc/ceilometer/ceilometer.conf |
| 21 | fi |
| 22 | if [ ! -z "$RABBIT_HOST" ]; then |
| 23 | sed -r -i "s/[#]*(rabbit_host) = (.*)/\1 = $RABBIT_HOST/g" /etc/ceilometer/ceilometer.conf |
| 24 | fi |
| 25 | if [ ! -z "$RABBIT_USER" ]; then |
| 26 | sed -r -i "s/[#]*(rabbit_userid) = (.*)/\1 = $RABBIT_USER/g" /etc/ceilometer/ceilometer.conf |
| 27 | fi |
| 28 | if [ ! -z "$RABBIT_PASS" ]; then |
| 29 | sed -r -i "s/[#]*(rabbit_password) = (.*)/\1 = $RABBIT_PASS/g" /etc/ceilometer/ceilometer.conf |
| 30 | fi |
| 31 | |
| 32 | #Run ceilometer-agent-notification |
| 33 | /usr/local/bin/ceilometer-agent-notification |