diff --git a/ct/authentik.sh b/ct/authentik.sh index 321bde30..3dde4f00 100644 --- a/ct/authentik.sh +++ b/ct/authentik.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# Co-Author: remz1337 +# Copyright (c) 2021-2024 community-scripts ORG +# Author: remz1337 # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -98,7 +97,6 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} systemctl start authentik-server systemctl start authentik-worker msg_ok "Started Authentik" - echo -e "\n ⚠️ Ensure you set resources back to normal settings \n" else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi @@ -109,10 +107,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:9000/if/flow/initial-setup/${CL} \n" \ No newline at end of file diff --git a/install/authentik-install.sh b/install/authentik-install.sh index e887b57e..44558b52 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -15,10 +15,27 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y {curl,sudo,mc} -$STD apt-get install -y gpg pkg-config libffi-dev -$STD apt-get install -y --no-install-recommends build-essential libpq-dev libkrb5-dev -$STD apt-get install -y libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev pkg-config libffi-dev zlib1g-dev libxmlsec1 libxmlsec1-dev libxmlsec1-openssl libmaxminddb0 +$STD apt-get install -y --no-install-recommends \ + curl \ + sudo \ + mc \ + gpg \ + pkg-config \ + libffi-dev \ + build-essential \ + libpq-dev \ + libkrb5-dev \ + libssl-dev \ + libsqlite3-dev \ + tk-dev \ + libgdbm-dev \ + libc6-dev \ + libbz2-dev \ + zlib1g-dev \ + libxmlsec1 \ + libxmlsec1-dev \ + libxmlsec1-openssl \ + libmaxminddb0 msg_ok "Installed Dependencies" msg_info "Installing yq" @@ -48,6 +65,18 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js ${NODE_VER}" +msg_info "Installing Golang" +cd ~ +set +o pipefail +GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz") +$STD wget -q https://golang.org/dl/${GO_RELEASE} +tar -xzf ${GO_RELEASE} -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/bin/go +rm -rf go/ +rm -rf ${GO_RELEASE} +set -o pipefail +msg_ok "Installed Golang" + msg_info "Building Authentik website" RELEASE=$(curl -s https://api.github.com/repos/goauthentik/authentik/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}') mkdir -p /opt/authentik @@ -63,18 +92,6 @@ $STD npm run build echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Built Authentik website" -msg_info "Installing Golang" -cd ~ -set +o pipefail -GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz") -$STD wget -q https://golang.org/dl/${GO_RELEASE} -tar -xzf ${GO_RELEASE} -C /usr/local -$STD ln -s /usr/local/go/bin/go /usr/bin/go -rm -rf go/ -rm -rf ${GO_RELEASE} -set -o pipefail -msg_ok "Installed Golang" - msg_info "Building Go Proxy" cd /opt/authentik $STD go mod download