5 if [ "$1" = "triggered" ]; then
6 invoke-rc.d mcollective stop || :
7 invoke-rc.d mcollective start
11 MCOLLECTIVE_SERVER_CFG="/etc/mcollective/server.cfg"
15 if [ ! -e "$MCOLLECTIVE_SERVER_CFG" ]; then
16 cp /usr/share/mcollective/server.cfg $MCOLLECTIVE_SERVER_CFG
18 # try to update config file values
19 # remove deprecated voncif goption
20 sed -i 's/^topicprefix.*$//g' $MCOLLECTIVE_SERVER_CFG
21 # change default connector. previous one "stomp" has been deprecated since 2.2.0
22 sed -i 's/^connector = stomp/connector = activemq\nplugin.activemq.pool.size = 1/g' $MCOLLECTIVE_SERVER_CFG
23 # change stomp options to activemq ones, keeping user values
24 sed -i 's/^plugin.stomp.host=\(.*\)$/plugin.activemq.pool.1.host = \1/g' $MCOLLECTIVE_SERVER_CFG
25 sed -i 's/^plugin.stomp.port=.*$/plugin.activemq.pool.1.port = 61613/g' $MCOLLECTIVE_SERVER_CFG
26 sed -i 's/^plugin.stomp.user=\(.*\)$/plugin.activemq.pool.1.user = \1/g' $MCOLLECTIVE_SERVER_CFG
27 sed -i 's/^plugin.stomp.password=\(.*\)/plugin.activemq.pool.1.password = \1/g' $MCOLLECTIVE_SERVER_CFG
30 chmod 600 $MCOLLECTIVE_SERVER_CFG
32 abort-upgrade|abort-remove|abort-deconfigure)
35 echo "postinst called with unknown argument \`${1}'" >&2