Skip to content

Commit 870313c

Browse files
authored
Update keycloak.sh (#874)
1 parent e9c0ca8 commit 870313c

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

ct/keycloak.sh

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
77

88
# App Default Values
99
APP="Keycloak"
10-
var_tags="access management"
10+
var_tags="access-management"
1111
var_cpu="2"
1212
var_ram="2048"
1313
var_disk="4"
@@ -25,38 +25,38 @@ color
2525
catch_errors
2626

2727
function update_script() {
28-
header_info
29-
check_container_storage
30-
check_container_resources
31-
if [[ ! -f /etc/systemd/system/keycloak.service ]]; then
32-
msg_error "No ${APP} Installation Found!"
33-
exit
34-
fi
35-
msg_info "Updating ${APP} LXC"
28+
header_info
29+
check_container_storage
30+
check_container_resources
31+
if [[ ! -f /etc/systemd/system/keycloak.service ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
msg_info "Updating ${APP} LXC"
3636

37-
msg_info "Updating packages"
38-
apt-get update &>/dev/null
39-
apt-get -y upgrade &>/dev/null
37+
msg_info "Updating packages"
38+
apt-get update &>/dev/null
39+
apt-get -y upgrade &>/dev/null
4040

41-
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
42-
msg_info "Updating Keycloak to v$RELEASE"
43-
cd /opt
44-
wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz
45-
mv keycloak keycloak.old
46-
tar -xzf keycloak-$RELEASE.tar.gz
47-
cp -r keycloak.old/conf keycloak-$RELEASE
48-
cp -r keycloak.old/providers keycloak-$RELEASE
49-
cp -r keycloak.old/themes keycloak-$RELEASE
50-
mv keycloak-$RELEASE keycloak
41+
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
42+
msg_info "Updating Keycloak to v$RELEASE"
43+
cd /opt
44+
wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz
45+
mv keycloak keycloak.old
46+
tar -xzf keycloak-$RELEASE.tar.gz
47+
cp -r keycloak.old/conf keycloak-$RELEASE
48+
cp -r keycloak.old/providers keycloak-$RELEASE
49+
cp -r keycloak.old/themes keycloak-$RELEASE
50+
mv keycloak-$RELEASE keycloak
5151

52-
msg_info "Delete temporary installation files"
53-
rm keycloak-$RELEASE.tar.gz
54-
rm -rf keycloak.old
52+
msg_info "Delete temporary installation files"
53+
rm keycloak-$RELEASE.tar.gz
54+
rm -rf keycloak.old
5555

56-
msg_info "Restating Keycloak"
57-
systemctl restart keycloak
58-
msg_ok "Updated Successfully"
59-
exit
56+
msg_info "Restating Keycloak"
57+
systemctl restart keycloak
58+
msg_ok "Updated Successfully"
59+
exit
6060
}
6161

6262
start

0 commit comments

Comments
 (0)