From d28fa521a9bd8606a0142a31b7e26bf0ddc17eae Mon Sep 17 00:00:00 2001 From: celso Date: Fri, 16 Jun 2023 04:20:03 -0300 Subject: [PATCH] fixed wrong check that resulted in unnecesary access token retrievals --- getvods.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getvods.sh b/getvods.sh index 31da19f..78612ac 100755 --- a/getvods.sh +++ b/getvods.sh @@ -48,7 +48,7 @@ get_token(){ } [ -f "${CFG_DIR}/token.json" ] && [ -f "${CFG_DIR}/expiration.txt" ] && { - [ "$(cat "${CFG_DIR}/expiration.txt")" -le "$(date +%s)" ] && get_token + [ "$(cat "${CFG_DIR}/expiration.txt")" -le "$(date +%s)" ] && get_token || : } || { get_token }