Format authentik update script and trim blank line
Reformat ct/authentik.sh for consistent indentation and add an explicit exit at the end of the update_script function to ensure the updater stops after completing. Also remove an extra blank line in install/github-runner-install.sh. No functional logic changes beyond the added exit and whitespace cleanup.
This commit is contained in:
168
ct/authentik.sh
168
ct/authentik.sh
@@ -20,93 +20,93 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
AUTHENTIK_VERSION="version/2026.2.0"
|
AUTHENTIK_VERSION="version/2026.2.0"
|
||||||
NODE_VERSION="24"
|
NODE_VERSION="24"
|
||||||
|
|
||||||
if [[ ! -d /opt/authentik ]]; then
|
if [[ ! -d /opt/authentik ]]; then
|
||||||
msg_error "No authentik Installation Found!"
|
msg_error "No authentik Installation Found!"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$AUTHENTIK_VERSION" == "$(cat $HOME/.authentik)" ]]; then
|
|
||||||
msg_ok "Authentik up-to-date"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "geoipupdate" "maxmind/geoipupdate"; then
|
|
||||||
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Stopping Services"
|
|
||||||
systemctl stop authentik-server.service
|
|
||||||
systemctl stop authentik-worker.service
|
|
||||||
msg_ok "Stopped Services"
|
|
||||||
|
|
||||||
if check_for_gh_release "xmlsec" "lsh123/xmlsec"; then
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "latest" "/opt/xmlsec"
|
|
||||||
|
|
||||||
msg_info "Update xmlsec"
|
|
||||||
cd /opt/xmlsec
|
|
||||||
$STD ./autogen.sh
|
|
||||||
$STD make -j $(nproc)
|
|
||||||
$STD make check
|
|
||||||
$STD make install
|
|
||||||
ldconfig
|
|
||||||
msg_ok "xmlsec updated"
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup_nodejs
|
|
||||||
setup_go
|
|
||||||
|
|
||||||
if check_for_gh_release "authentik" "goauthentik/authentik" "${AUTHENTIK_VERSION}"; then
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
|
||||||
|
|
||||||
msg_info "Update web"
|
|
||||||
cd /opt/authentik/web
|
|
||||||
NODE_ENV="production"
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build
|
|
||||||
$STD npm run build:sfe
|
|
||||||
msg_ok "Web updated"
|
|
||||||
|
|
||||||
msg_info "Update go proxy"
|
|
||||||
cd /opt/authentik
|
|
||||||
CGO_ENABLED="1"
|
|
||||||
$STD go mod download
|
|
||||||
$STD go build -o /opt/authentik/authentik-server ./cmd/server
|
|
||||||
msg_ok "Go proxy updated"
|
|
||||||
|
|
||||||
setup_uv
|
|
||||||
|
|
||||||
setup_rust
|
|
||||||
|
|
||||||
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_COMPILE_BYTECODE="1"
|
|
||||||
UV_LINK_MODE="copy"
|
|
||||||
UV_NATIVE_TLS="1"
|
|
||||||
RUSTUP_PERMIT_COPY_RENAME="true"
|
|
||||||
cd /opt/authentik
|
|
||||||
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
|
||||||
$STD uv sync --frozen --no-install-project --no-dev
|
|
||||||
msg_ok "Python server updated"
|
|
||||||
|
|
||||||
chown -R authentik:authentik /opt/authentik
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Restarting services"
|
|
||||||
systemctl restart authentik-server.service authentik-worker.service
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$AUTHENTIK_VERSION" == "$(cat $HOME/.authentik)" ]]; then
|
||||||
|
msg_ok "Authentik up-to-date"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "geoipupdate" "maxmind/geoipupdate"; then
|
||||||
|
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Stopping Services"
|
||||||
|
systemctl stop authentik-server.service
|
||||||
|
systemctl stop authentik-worker.service
|
||||||
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
|
if check_for_gh_release "xmlsec" "lsh123/xmlsec"; then
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "latest" "/opt/xmlsec"
|
||||||
|
|
||||||
|
msg_info "Update xmlsec"
|
||||||
|
cd /opt/xmlsec
|
||||||
|
$STD ./autogen.sh
|
||||||
|
$STD make -j $(nproc)
|
||||||
|
$STD make check
|
||||||
|
$STD make install
|
||||||
|
ldconfig
|
||||||
|
msg_ok "xmlsec updated"
|
||||||
|
fi
|
||||||
|
|
||||||
|
setup_nodejs
|
||||||
|
setup_go
|
||||||
|
|
||||||
|
if check_for_gh_release "authentik" "goauthentik/authentik" "${AUTHENTIK_VERSION}"; then
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
|
||||||
|
|
||||||
|
msg_info "Update web"
|
||||||
|
cd /opt/authentik/web
|
||||||
|
NODE_ENV="production"
|
||||||
|
$STD npm install
|
||||||
|
$STD npm run build
|
||||||
|
$STD npm run build:sfe
|
||||||
|
msg_ok "Web updated"
|
||||||
|
|
||||||
|
msg_info "Update go proxy"
|
||||||
|
cd /opt/authentik
|
||||||
|
CGO_ENABLED="1"
|
||||||
|
$STD go mod download
|
||||||
|
$STD go build -o /opt/authentik/authentik-server ./cmd/server
|
||||||
|
msg_ok "Go proxy updated"
|
||||||
|
|
||||||
|
setup_uv
|
||||||
|
|
||||||
|
setup_rust
|
||||||
|
|
||||||
|
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_COMPILE_BYTECODE="1"
|
||||||
|
UV_LINK_MODE="copy"
|
||||||
|
UV_NATIVE_TLS="1"
|
||||||
|
RUSTUP_PERMIT_COPY_RENAME="true"
|
||||||
|
cd /opt/authentik
|
||||||
|
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
||||||
|
$STD uv sync --frozen --no-install-project --no-dev
|
||||||
|
msg_ok "Python server updated"
|
||||||
|
|
||||||
|
chown -R authentik:authentik /opt/authentik
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Restarting services"
|
||||||
|
systemctl restart authentik-server.service authentik-worker.service
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
git \
|
git \
|
||||||
|
|||||||
Reference in New Issue
Block a user