From e6361570b3331f5e51686d6fd58ede6a5139d2d4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:23:56 +0100 Subject: [PATCH] Update keycloak.sh --- ct/keycloak.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 8a1ecfd9..05d460c3 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -39,18 +39,14 @@ function update_script() { apt-get -y upgrade &>/dev/null RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - msg_info "Downloading Keycloak v$RELEASE" + msg_info "Updating Keycloak to v$RELEASE" cd /opt wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz - $STD tar -xvf keycloak-$RELEASE.tar.gz - - msg_info "Merging configuration files" - cp -r keycloak/conf keycloak-$RELEASE - cp -r keycloak/providers keycloak-$RELEASE - cp -r keycloak/themes keycloak-$RELEASE - - msg_info "Updating Keycloak" mv keycloak keycloak.old + tar -xzf keycloak-$RELEASE.tar.gz + cp -r keycloak.old/conf keycloak-$RELEASE + cp -r keycloak.old/providers keycloak-$RELEASE + cp -r keycloak.old/themes keycloak-$RELEASE mv keycloak-$RELEASE keycloak msg_info "Delete temporary installation files" @@ -70,4 +66,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/admin${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/admin${CL}"