5 MCOLLECTIVE_CLIENT_CFG="/etc/mcollective/client.cfg"
9 if [ ! -e "$MCOLLECTIVE_CLIENT_CFG" ]; then
10 cp /usr/share/mcollective-client/client.cfg $MCOLLECTIVE_CLIENT_CFG
12 # try to update config file values
13 # remove deprecated voncif goption
14 sed -i 's/^topicprefix.*$//g' $MCOLLECTIVE_CLIENT_CFG
15 # change default connector. previous one "stomp" has been deprecated since 2.2.0
16 sed -i 's/^connector = stomp/connector = activemq\nplugin.activemq.pool.size = 1/g' $MCOLLECTIVE_CLIENT_CFG
17 # change stomp options to activemq ones, keeping user values
18 sed -i 's/^plugin.stomp.host=\(.*\)$/plugin.activemq.pool.1.host = \1/g' $MCOLLECTIVE_CLIENT_CFG
19 sed -i 's/^plugin.stomp.port=.*$/plugin.activemq.pool.1.port = 61613/g' $MCOLLECTIVE_CLIENT_CFG
20 sed -i 's/^plugin.stomp.user=\(.*\)$/plugin.activemq.pool.1.user = \1/g' $MCOLLECTIVE_CLIENT_CFG
21 sed -i 's/^plugin.stomp.password=\(.*\)/plugin.activemq.pool.1.password = \1/g' $MCOLLECTIVE_CLIENT_CFG
24 chmod 600 $MCOLLECTIVE_CLIENT_CFG
26 abort-upgrade|abort-remove|abort-deconfigure)
29 echo "postinst called with unknown argument \`${1}'" >&2