Petr Fortelny b98559c3bc Re-order logic in plugin.sh
- Move collectd installation into install section

Change-Id: I3613c6f167e47f70924c00252dcfdde71ed75eed
Closes-Bug: #1623992
2016-12-13 10:57:14 -05:00

42 lines
1.0 KiB
Bash

local xtrace=$(set +o | grep xtrace)
set -o xtrace
# Initial source of lib script
source $COLLECTD_CEILOMETER_DIR/devstack/libs/collectd
case $1 in
"stack")
case $2 in
"pre-install")
# no-op
:
;;
"install")
# install system package
install_collectd
# adapt collectd.conf
adapt_collectd_conf
;;
"post-config")
# start collectd service
start_collectd
;;
"extra")
# no-op
:
;;
esac
;;
"unstack")
# stop the service and restore original /etc/collect.conf
stop_collectd
restore_collectd_conf
;;
"clean")
# no cleaning required as of now
:
;;
esac
$xtrace