mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-08 16:59:17 +00:00
Compare commits
No commits in common. "a060974fcef9903d6df70bf4420e2cbb96679c8b" and "250ffddee776758f6d21eedf14ae7f757bc3b1cd" have entirely different histories.
a060974fce
...
250ffddee7
@ -5,35 +5,60 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
# App Default Values
|
function header_info {
|
||||||
APP="Authentik"
|
clear
|
||||||
var_tags="identity-provider"
|
cat <<"EOF"
|
||||||
|
___ __ __ __ _ __
|
||||||
|
/ | __ __/ /_/ /_ ___ ____ / /_(_) /__
|
||||||
|
/ /| |/ / / / __/ __ \/ _ \/ __ \/ __/ / //_/
|
||||||
|
/ ___ / /_/ / /_/ / / / __/ / / / /_/ / ,<
|
||||||
|
/_/ |_\__,_/\__/_/ /_/\___/_/ /_/\__/_/_/|_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
header_info
|
||||||
|
echo -e "Loading..."
|
||||||
|
APP="authentik"
|
||||||
var_disk="15"
|
var_disk="15"
|
||||||
var_cpu="6"
|
var_cpu="6"
|
||||||
var_ram="8192"
|
var_ram="8192"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
var_unprivileged="1"
|
|
||||||
|
|
||||||
# App Output & Base Settings
|
|
||||||
header_info "$APP"
|
|
||||||
base_settings
|
|
||||||
|
|
||||||
# Core
|
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
|
function default_settings() {
|
||||||
|
CT_TYPE="1"
|
||||||
|
PW=""
|
||||||
|
CT_ID=$NEXTID
|
||||||
|
HN=$NSAPP
|
||||||
|
DISK_SIZE="$var_disk"
|
||||||
|
CORE_COUNT="$var_cpu"
|
||||||
|
RAM_SIZE="$var_ram"
|
||||||
|
BRG="vmbr0"
|
||||||
|
NET="dhcp"
|
||||||
|
GATE=""
|
||||||
|
APT_CACHER=""
|
||||||
|
APT_CACHER_IP=""
|
||||||
|
DISABLEIP6="no"
|
||||||
|
MTU=""
|
||||||
|
SD=""
|
||||||
|
NS=""
|
||||||
|
MAC=""
|
||||||
|
VLAN=""
|
||||||
|
SSH="no"
|
||||||
|
VERB="no"
|
||||||
|
echo_default
|
||||||
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -f /etc/systemd/system/authentik-server.service ]]; then
|
if [[ ! -f /etc/systemd/system/authentik-server.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
msg_error "No ${APP} Installation Found!"
|
RELEASE=$(curl -s https://api.github.com/repos/goauthentik/authentik/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}')
|
||||||
exit
|
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
fi
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/goauthentik/authentik/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}')
|
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
|
||||||
msg_info "Stopping ${APP}"
|
msg_info "Stopping ${APP}"
|
||||||
systemctl stop authentik-server
|
systemctl stop authentik-server
|
||||||
systemctl stop authentik-worker
|
systemctl stop authentik-worker
|
||||||
@ -70,16 +95,14 @@ function update_script() {
|
|||||||
systemctl start authentik-server
|
systemctl start authentik-server
|
||||||
systemctl start authentik-worker
|
systemctl start authentik-worker
|
||||||
msg_ok "Started ${APP}"
|
msg_ok "Started ${APP}"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/if/flow/initial-setup/${CL}"
|
|
@ -1,8 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 community-scripts ORG
|
# Copyright (c) 2021-2024 community-scripts ORG
|
||||||
# Author: remz1337
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# Co-Author: remz1337
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -39,14 +41,12 @@ $STD apt-get install -y \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing yq"
|
msg_info "Installing yq"
|
||||||
cd /tmp
|
|
||||||
YQ_LATEST="$(wget -qO- "https://api.github.com/repos/mikefarah/yq/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')"
|
YQ_LATEST="$(wget -qO- "https://api.github.com/repos/mikefarah/yq/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')"
|
||||||
wget -q "https://github.com/mikefarah/yq/releases/download/${YQ_LATEST}/yq_linux_amd64" -qO /usr/bin/yq
|
$STD wget "https://github.com/mikefarah/yq/releases/download/${YQ_LATEST}/yq_linux_amd64" -qO /usr/bin/yq
|
||||||
chmod +x /usr/bin/yq
|
chmod +x /usr/bin/yq
|
||||||
msg_ok "Installed yq"
|
msg_ok "Installed yq"
|
||||||
|
|
||||||
msg_info "Installing GeoIP"
|
msg_info "Installing GeoIP"
|
||||||
cd /tmp
|
|
||||||
GEOIP_RELEASE=$(curl -s https://api.github.com/repos/maxmind/geoipupdate/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
GEOIP_RELEASE=$(curl -s https://api.github.com/repos/maxmind/geoipupdate/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
wget -qO geoipupdate.deb https://github.com/maxmind/geoipupdate/releases/download/v${GEOIP_RELEASE}/geoipupdate_${GEOIP_RELEASE}_linux_amd64.deb
|
wget -qO geoipupdate.deb https://github.com/maxmind/geoipupdate/releases/download/v${GEOIP_RELEASE}/geoipupdate_${GEOIP_RELEASE}_linux_amd64.deb
|
||||||
$STD dpkg -i geoipupdate.deb
|
$STD dpkg -i geoipupdate.deb
|
||||||
@ -59,7 +59,6 @@ EOF
|
|||||||
msg_ok "Installed GeoIP"
|
msg_ok "Installed GeoIP"
|
||||||
|
|
||||||
msg_info "Setting up Python 3"
|
msg_info "Setting up Python 3"
|
||||||
cd /tmp
|
|
||||||
wget -q https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz -O Python.tgz
|
wget -q https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz -O Python.tgz
|
||||||
tar -zxf Python.tgz
|
tar -zxf Python.tgz
|
||||||
cd Python-3.12.1
|
cd Python-3.12.1
|
||||||
@ -81,7 +80,6 @@ $STD apt-get install -y nodejs
|
|||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Installing Golang"
|
msg_info "Installing Golang"
|
||||||
cd /tmp
|
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz")
|
GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz")
|
||||||
wget -q https://golang.org/dl/${GO_RELEASE}
|
wget -q https://golang.org/dl/${GO_RELEASE}
|
||||||
@ -183,11 +181,11 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /tmp/Python-3.12.1
|
rm -rf Python-3.12.1
|
||||||
rm -rf /tmp/Python.tgz
|
rm -rf Python.tgz
|
||||||
rm -rf go/
|
rm -rf go/
|
||||||
rm -rf /tmp/${GO_RELEASE}
|
rm -rf ${GO_RELEASE}
|
||||||
rm -rf /tmp/geoipupdate.deb
|
rm geoipupdate.deb
|
||||||
rm -rf authentik.tar.gz
|
rm -rf authentik.tar.gz
|
||||||
$STD apt-get -y remove yq
|
$STD apt-get -y remove yq
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"categories": [
|
"categories": [
|
||||||
11
|
11
|
||||||
],
|
],
|
||||||
"date_created": "2024-12-26",
|
"date_created": "2024-11-06",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
@ -32,8 +32,8 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Authentik is very resource-heavy, it is recommended to use at least 8GB RAM anytime!",
|
"text": "Initial configuration at http://<IP>:9000/if/flow/initial-setup/",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user