Merge pull request #1524 from thieneret/update/authentik
Update authentik script
This commit is contained in:
@@ -24,7 +24,7 @@ function update_script() {
|
|||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
AUTHENTIK_VERSION="version/2025.12.4"
|
AUTHENTIK_VERSION="version/2026.2.0"
|
||||||
NODE_VERSION="24"
|
NODE_VERSION="24"
|
||||||
|
|
||||||
if [[ ! -d /opt/authentik ]]; then
|
if [[ ! -d /opt/authentik ]]; then
|
||||||
@@ -32,7 +32,7 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$AUTHENTIK_VERSION" == "$(cat /opt/authentik_version.txt)" ]]; then
|
if [[ "$AUTHENTIK_VERSION" == "$(cat $HOME/.authentik)" ]]; then
|
||||||
msg_ok "Authentik up-to-date"
|
msg_ok "Authentik up-to-date"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@@ -63,9 +63,9 @@ function update_script() {
|
|||||||
setup_nodejs
|
setup_nodejs
|
||||||
setup_go
|
setup_go
|
||||||
|
|
||||||
if check_for_gh_tag "authentik" "goauthentik/authentik" "${AUTHENTIK_VERSION}"; then
|
if check_for_gh_release "authentik" "goauthentik/authentik" "${AUTHENTIK_VERSION}"; then
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tag" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
||||||
|
|
||||||
msg_info "Update web"
|
msg_info "Update web"
|
||||||
cd /opt/authentik/web
|
cd /opt/authentik/web
|
||||||
@@ -87,18 +87,19 @@ function update_script() {
|
|||||||
setup_rust
|
setup_rust
|
||||||
|
|
||||||
msg_info "Update python server"
|
msg_info "Update python server"
|
||||||
|
$STD uv python install 3.14.3 -i /usr/local/bin
|
||||||
UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
|
UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
|
||||||
UV_COMPILE_BYTECODE="1"
|
UV_COMPILE_BYTECODE="1"
|
||||||
UV_LINK_MODE="copy"
|
UV_LINK_MODE="copy"
|
||||||
UV_NATIVE_TLS="1"
|
UV_NATIVE_TLS="1"
|
||||||
RUSTUP_PERMIT_COPY_RENAME="true"
|
RUSTUP_PERMIT_COPY_RENAME="true"
|
||||||
cd /opt/authentik
|
cd /opt/authentik
|
||||||
|
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
||||||
$STD uv sync --frozen --no-install-project --no-dev
|
$STD uv sync --frozen --no-install-project --no-dev
|
||||||
msg_ok "Python server updated"
|
msg_ok "Python server updated"
|
||||||
|
|
||||||
chown -R authentik:authentik /opt/authentik
|
chown -R authentik:authentik /opt/authentik
|
||||||
|
|
||||||
echo "${AUTHENTIK_VERSION}" > /opt/authentik_version.txt
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Restarting services"
|
msg_info "Restarting services"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Thieneret
|
# Author: Thieneret
|
||||||
# License: MIT | https://github.com/thieneret/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# Source: https://github.com/goauthentik/authentik
|
# Source: https://github.com/goauthentik/authentik
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
@@ -43,10 +43,11 @@ $STD apt install -y \
|
|||||||
autoconf \
|
autoconf \
|
||||||
libtool \
|
libtool \
|
||||||
libtool-bin \
|
libtool-bin \
|
||||||
gcc
|
gcc \
|
||||||
|
git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
AUTHENTIK_VERSION="version/2025.12.4"
|
AUTHENTIK_VERSION="version/2026.2.0"
|
||||||
NODE_VERSION="24"
|
NODE_VERSION="24"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "latest" "/opt/xmlsec"
|
fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "latest" "/opt/xmlsec"
|
||||||
@@ -63,7 +64,7 @@ msg_ok "xmlsec installed"
|
|||||||
setup_nodejs
|
setup_nodejs
|
||||||
setup_go
|
setup_go
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tag" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
||||||
|
|
||||||
msg_info "Setup web"
|
msg_info "Setup web"
|
||||||
cd /opt/authentik/web
|
cd /opt/authentik/web
|
||||||
@@ -102,12 +103,14 @@ setup_uv
|
|||||||
setup_rust
|
setup_rust
|
||||||
|
|
||||||
msg_info "Setup python server"
|
msg_info "Setup python server"
|
||||||
|
$STD uv python install 3.14.3 -i /usr/local/bin
|
||||||
UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
|
UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
|
||||||
UV_COMPILE_BYTECODE="1"
|
UV_COMPILE_BYTECODE="1"
|
||||||
UV_LINK_MODE="copy"
|
UV_LINK_MODE="copy"
|
||||||
UV_NATIVE_TLS="1"
|
UV_NATIVE_TLS="1"
|
||||||
RUSTUP_PERMIT_COPY_RENAME="true"
|
RUSTUP_PERMIT_COPY_RENAME="true"
|
||||||
cd /opt/authentik
|
cd /opt/authentik
|
||||||
|
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
||||||
$STD uv sync --frozen --no-install-project --no-dev
|
$STD uv sync --frozen --no-install-project --no-dev
|
||||||
msg_ok "Installed python server"
|
msg_ok "Installed python server"
|
||||||
|
|
||||||
@@ -192,8 +195,6 @@ EOF
|
|||||||
systemctl enable -q --now authentik-server.service authentik-worker.service
|
systemctl enable -q --now authentik-server.service authentik-worker.service
|
||||||
msg_ok "Services created"
|
msg_ok "Services created"
|
||||||
|
|
||||||
echo "${AUTHENTIK_VERSION}" > /opt/authentik_version.txt
|
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
cleanup_lxc
|
cleanup_lxc
|
||||||
|
|||||||
Reference in New Issue
Block a user