Skip to content

Commit

Permalink
aws-vpc-route53: Removed absolute path for awk command
Browse files Browse the repository at this point in the history
  • Loading branch information
gguifelixamz committed Jun 21, 2019
1 parent 799669a commit 25cd5b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions heartbeat/aws-vpc-route53.in
Expand Up @@ -214,7 +214,7 @@ r53_monitor() {
#
cmd="aws $AWS_PROFILE_OPT route53 list-resource-record-sets --hosted-zone-id $OCF_RESKEY_hostedzoneid --query ResourceRecordSets[?Name=='$OCF_RESKEY_fullname']"
ocf_log debug "Route53 Agent Starting or probing - executing monitoring API call: $cmd"
ARECORD="$($cmd | grep RESOURCERECORDS | /usr/bin/awk '{ print $2 }')"
ARECORD="$($cmd | grep RESOURCERECORDS | awk '{ print $2 }')"
else
#
cmd="dig +retries=3 +time=5 +short $OCF_RESKEY_fullname 2>/dev/null"
Expand All @@ -235,7 +235,7 @@ r53_monitor() {
ocf_log info "Monitor skipping cluster action due to API call error"
return $OCF_SUCCESS
fi
ARECORD=$(echo $CLIRES | grep RESOURCERECORDS | /usr/bin/awk '{ print $5 }')
ARECORD=$(echo $CLIRES | grep RESOURCERECORDS | awk '{ print $5 }')
fi
#
fi
Expand Down Expand Up @@ -296,7 +296,7 @@ _update_record() {
EOF
cmd="aws --profile $OCF_RESKEY_profile route53 change-resource-record-sets --hosted-zone-id $OCF_RESKEY_hostedzoneid --change-batch file://$ROUTE53RECORD "
ocf_log debug "Executing command: $cmd"
CHANGEID=$($cmd | grep CHANGEINFO | /usr/bin/awk -F'\t' '{ print $3 }' )
CHANGEID=$($cmd | grep CHANGEINFO | awk -F'\t' '{ print $3 }' )
ocf_log debug "Change id: $CHANGEID"
rmtempfile $ROUTE53RECORD
CHANGEID=$(echo $CHANGEID | cut -d'/' -f 3 | cut -d'"' -f 1 )
Expand All @@ -305,7 +305,7 @@ _update_record() {
MYSECONDS=8
while [ "$STATUS" = 'PENDING' ]; do
sleep $MYSECONDS
STATUS="$(aws --profile $OCF_RESKEY_profile route53 get-change --id $CHANGEID | grep CHANGEINFO | /usr/bin/awk -F'\t' '{ print $4 }' |cut -d'"' -f 2 )"
STATUS="$(aws --profile $OCF_RESKEY_profile route53 get-change --id $CHANGEID | grep CHANGEINFO | awk -F'\t' '{ print $4 }' |cut -d'"' -f 2 )"
ocf_log debug "Waited for $MYSECONDS seconds and checked execution of Route 53 update status: $STATUS "
done
}
Expand Down

0 comments on commit 25cd5b1

Please sign in to comment.