From ef3bb43405e3e5da50dc25c0a73d9e9361050ec0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:30:24 +0100 Subject: [PATCH] fix paths to tmp --- install/authentik-install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install/authentik-install.sh b/install/authentik-install.sh index 526832d12..10b42b5e0 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -41,12 +41,14 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Installing yq" +cd /tmp YQ_LATEST="$(wget -qO- "https://api.github.com/repos/mikefarah/yq/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')" -$STD wget "https://github.com/mikefarah/yq/releases/download/${YQ_LATEST}/yq_linux_amd64" -qO /usr/bin/yq +wget -q "https://github.com/mikefarah/yq/releases/download/${YQ_LATEST}/yq_linux_amd64" -qO /usr/bin/yq chmod +x /usr/bin/yq msg_ok "Installed yq" 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) }') 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 @@ -59,6 +61,7 @@ EOF msg_ok "Installed GeoIP" 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 tar -zxf Python.tgz cd Python-3.12.1 @@ -80,6 +83,7 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Golang" +cd /tmp set +o pipefail 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} @@ -181,13 +185,13 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf Python-3.12.1 -rm -rf Python.tgz +rm -rf /tmp/Python-3.12.1 +rm -rf /tmp/Python.tgz rm -rf go/ -rm -rf ${GO_RELEASE} -rm geoipupdate.deb +rm -rf /tmp/${GO_RELEASE} +rm -rf /tmp/geoipupdate.deb rm -rf authentik.tar.gz $STD apt-get -y remove yq $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned"