~anitanayak/charms/trusty/layer-ibm-mq/layer-ibm-mq-branch

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: vsasi
  • Date: 2015-05-03 16:48:56 UTC
  • mfrom: (30.1.10 devfix)
  • Revision ID: vsasi-20150503164856-6wooam8bsmbvjycm
Update to relation functionality

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
                        # Get the queue manager name 
39
39
                        queue_mgr_name=${queue:${#questr}:${#queue}-${#questr}-1}
40
40
                        juju-log "Stopping queue manager $queue_mgr_name"
41
 
                        $MQ_INSTALL_PATH/bin/endmqm $queue_mgr_name
42
 
                        $MQ_INSTALL_PATH/bin/endmqlsr -m $queue_mgr_name
 
41
                        set +e
 
42
                        su -l mqm -c "$MQ_INSTALL_PATH/bin/endmqm -w $queue_mgr_name"
 
43
                        su -l mqm -c "$MQ_INSTALL_PATH/bin/endmqlsr -w -m $queue_mgr_name"
 
44
                        set -e
43
45
                done
44
 
 
45
46
                # Get list of packages and remove them
46
47
                mq_rpms="`rpm -qa | grep MQSeries`"
47
48
                juju-log "Removing package(s) $mq_rpms"
108
109
 
109
110
        juju-log "License accepted"
110
111
        mq_inst=`is_mq_installed`
 
112
        if [ -f  $CHARM_DIR/files/archives/*.gz  ]; then
 
113
                juju-log "IBM MQ: Extracting IBM MQ package."
 
114
                tar xvfz $CHARM_DIR/files/archives/*.gz  --strip-components=1 -C $CHARM_DIR/files/archives 
 
115
                rm -rf  $CHARM_DIR/files/archives/*.gz
 
116
                juju-log "IBM MQ: Extracted IBM MQ package."
 
117
                juju-log "Awaiting acceptance of IBM MQ license (see README on how to accept the license)."
 
118
        fi
111
119
        if  [ $mq_inst == False ]; then
112
120
                # Check MQ package availability
113
121
                if [ -f  $CHARM_DIR/files/archives/MQSeriesServer*rpm ] && [ -f  $CHARM_DIR/files/archives/MQSeriesRuntime*rpm ];