Skip to content

Commit

Permalink
Fix logic for CF commands args
Browse files Browse the repository at this point in the history
  • Loading branch information
jriguera committed Sep 4, 2020
1 parent 7d06781 commit c6d264c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker/snpaas-tools/resources/manage-cf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,38 +211,38 @@ then
app-stats|cf-app-stats)
if [ -z "${1}" ]
then
echo_log "Application stats requires an extra argument, the app!"
else
if [ -z "${CF_ORG}" ] || [ -z "${CF_SPACE}" ]
then
echo_log "Application stats requires a define the CF_ORG and CF_SPACE env vars!"
else
cfexec statistics $1
RVALUE=$?
fi
else
echo_log "Application stats requires an extra argument, the app!"
fi
;;
mysql|cf-mysql)
if [ -z "${1}" ]
then
echo_log "Mysql client requires an extra argument, the service!"
else
if [ -z "${CF_ORG}" ] || [ -z "${CF_SPACE}" ]
then
echo_log "Mysql requires a define the CF_ORG and CF_SPACE env vars!"
else
cfexec mysql $1
RVALUE=$?
fi
else
echo_log "Mysql client requires an extra argument, the service!"
fi
;;
route-lookup|cf-route-lookup)
if [ -z "${1}" ]
then
echo_log "Searching a route requires an extra argument, the route!"
else
cfexec lookup-route $1
RVALUE=$?
else
echo_log "Searching a route requires an extra argument, the route!"
fi
;;
esac
Expand Down

0 comments on commit c6d264c

Please sign in to comment.