~ibmcharmers/charms/trusty/layer-ibm-mobilefirst-server/devel

« back to all changes in this revision

Viewing changes to reactive/ibm-db2.sh

  • Committer: Suchitra Venugopal
  • Date: 2016-06-09 13:47:13 UTC
  • Revision ID: suchvenu@in.ibm.com-20160609134713-423uvjxfyec0g3k4
DB2 Layered charm Final changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
506
506
        if grep -q "$servicename" $TEMP_KEY_FILE
507
507
        then
508
508
        key=`cat $TEMP_KEY_FILE | grep $servicename | cut -d":" -f2`
509
 
        juju-log "Key is $key"
510
509
        grep -v "$key" $AUTH_KEY_FILE > tempfile.txt
511
510
        mv tempfile.txt $AUTH_KEY_FILE
512
511
        if grep -q "$key" $AUTH_KEY_FILE
520
519
        mv tempfile1.txt $TEMP_KEY_FILE
521
520
        if grep -q "$key" $TEMP_KEY_FILE
522
521
        then
523
 
                juju-log "IBM DB2: SSH Key not deleted from $TEMP_KE    Y_FILE"
 
522
                juju-log "IBM DB2: SSH Key not deleted from $TEMP_KEY_FILE"
524
523
        else
525
 
                juju-log "IBM DB2: SSH Key deleted from $TEMP_KEY_F    ILE"
 
524
                juju-log "IBM DB2: SSH Key deleted from $TEMP_KEY_FILE"
526
525
        fi
527
526
 
528
527
fi
689
688
                set +e
690
689
                #Create a temp key file if it doesn't exist
691
690
                if [ -f $TEMP_KEY_FILE ]; then
692
 
                        juju-log "Temp file already exists"
 
691
                        juju-log "IBM DB2: Temp file already exists"
693
692
                else
694
693
                        echo "Temp Key File" > $TEMP_KEY_FILE
695
694
                fi
712
711
                set -e
713
712
        done
714
713
        juju-log "IBM DB2: Completed updating the authorized key"
715
 
        #set_state 'ibm-db2.client.sshconfigured'
716
714
        relation_call --state=db.available set_sshconfigured $service || true
717
715
}
718
716
 
773
771
                relation_call --state=db.departed dismiss $service || true
774
772
                relation_call --state=db.departed dismiss_sshconfigured $service || true
775
773
        done
776
 
        #remove_state 'ibm-db2.client.sshconfigured'
777
774
}
778
775
 
779
776