Skip to content

Commit 2d9fcbb

Browse files
authored
Update keycloak.sh (#762)
1 parent 0573adc commit 2d9fcbb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

ct/keycloak.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,14 @@ apt-get update &>/dev/null
6565
apt-get -y upgrade &>/dev/null
6666

6767
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
68-
msg_info "Downloading Keycloak v$RELEASE"
68+
msg_info "Updating Keycloak to v$RELEASE"
6969
cd /opt
7070
wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz
71-
$STD tar -xvf keycloak-$RELEASE.tar.gz
72-
73-
msg_info "Merging configuration files"
74-
cp -r keycloak/conf keycloak-$RELEASE
75-
cp -r keycloak/providers keycloak-$RELEASE
76-
cp -r keycloak/themes keycloak-$RELEASE
77-
78-
msg_info "Updating Keycloak"
7971
mv keycloak keycloak.old
72+
tar -xzf keycloak-$RELEASE.tar.gz
73+
cp -r keycloak.old/conf keycloak-$RELEASE
74+
cp -r keycloak.old/providers keycloak-$RELEASE
75+
cp -r keycloak.old/themes keycloak-$RELEASE
8076
mv keycloak-$RELEASE keycloak
8177

8278
msg_info "Delete temporary installation files"

0 commit comments

Comments
 (0)