From ddfa41a9023b3e8584f3999267033a8ba6e35b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Alberto=20D=C3=ADaz=20Orozco=20=28Akiel=29?= Date: Mon, 23 Mar 2026 21:26:00 +0100 Subject: [PATCH] Logout at the end of the script --- entrypoint.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 1d9611d..5fbe1bc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,3 +47,14 @@ if [ "$SUCCESS" != "true" ]; then fi echo -e "${GREEN}${BOLD}✓ Message sent${RESET} — channel: ${BOLD}${CHANNEL_NAME}${RESET}, sender: ${SENDER}, id: ${MSG_ID}" + +LOGOUT_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ + -H "X-Auth-Token: ${AUTH_TOKEN}" \ + -H "X-User-Id: ${USER_ID}" \ + "${SERVER}/api/v1/logout") || true + +if [ "${LOGOUT_STATUS}" = "200" ]; then + echo -e "${GREEN}✓ Logged out${RESET}" +else + echo -e "${RED}✗ Logout failed${RESET} — HTTP ${LOGOUT_STATUS}" +fi