From d5dbf0e5520b6fe5e7ed18ff2896bae7312c5f63 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 17 Jan 2023 11:54:55 -0500 Subject: [PATCH] Exit with error upon failure to get token When there's a failure to get the token from https://www.privateinternetaccess.com/api/client/v2/token exit with an error status of 1 instead of success --- get_token.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get_token.sh b/get_token.sh index bca23ce..f27ed41 100755 --- a/get_token.sh +++ b/get_token.sh @@ -79,7 +79,7 @@ if [ "$(echo "$generateTokenResponse" | jq -r '.token')" == "" ]; then echo echo -e "${red}Could not authenticate with the login credentials provided!${nc}" echo - exit + exit 1 fi echo -e "${green}OK!"