Skip to content

Commit

Permalink
Minor clean up based on initial PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
remz1337 committed Nov 17, 2024
1 parent 44e9a0d commit 94eb8dc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
10 changes: 2 additions & 8 deletions ct/authentik.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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"
49 changes: 33 additions & 16 deletions install/authentik-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 94eb8dc

Please sign in to comment.