Skip to content

Commit

Permalink
fix expired token on log-bosh
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrand committed Dec 6, 2018
1 parent d8b02fa commit 5a4c7a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/log-bosh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ else
printf "\n\n%bERROR : Bosh director \"${BOSH_TARGET}\" unknown.%b\n\n" "${RED}" "${STD}"
else
status=1
testToken=$(bosh env > /dev/null 2>&1)
if [ $? != 0 ] ; then
#--- Token expired, log out
bosh log-out > /dev/null 2>&1
fi

userConnected=$(bosh env | grep "not logged in")
if [ "${userConnected}" != "" ] ; then
#--- Log into the director and list active deployments
Expand Down

0 comments on commit 5a4c7a7

Please sign in to comment.