mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-20 15:08:06 +00:00
Zitadel: Fix release tarball crawling (#3716)
This commit is contained in:
parent
86577a0d0d
commit
5313bb0103
@ -27,7 +27,7 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/zitadel/zitadel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt | grep -oP '\d+\.\d+\.\d+')" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt | grep -oP '\d+\.\d+\.\d+')" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
msg_info "Stopping $APP"
|
msg_info "Stopping $APP"
|
||||||
systemctl stop zitadel
|
systemctl stop zitadel
|
||||||
@ -35,7 +35,7 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
msg_info "Updating $APP to ${RELEASE}"
|
||||||
cd /tmp || exit
|
cd /tmp || exit
|
||||||
curl -fsSL https://github.com/zitadel/zitadel/releases/download/"$RELEASE"/zitadel-linux-amd64.tar.gz | tar -xz
|
curl -fsSL "https://github.com/zitadel/zitadel/releases/download/v$RELEASE/zitadel-linux-amd64.tar.gz" | tar -xz
|
||||||
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
||||||
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
@ -39,8 +39,8 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_ADMIN_USER;"
|
|||||||
msg_ok "Installed PostgreSQL"
|
msg_ok "Installed PostgreSQL"
|
||||||
|
|
||||||
msg_info "Installing Zitadel"
|
msg_info "Installing Zitadel"
|
||||||
RELEASE=$(curl -fsSL https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/zitadel/zitadel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
curl -fsSL https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz | tar -xz
|
curl -fsSL "https://github.com/zitadel/zitadel/releases/download/v$RELEASE/zitadel-linux-amd64.tar.gz" | tar -xz
|
||||||
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
||||||
msg_ok "Installed Zitadel"
|
msg_ok "Installed Zitadel"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user