Update bunkerweb-install.sh

Refactor to eliminate script execution within another script, making the code easier to review.
pull/3419/head
tteckster 2024-07-22 06:39:34 -04:00 committed by GitHub
parent 80fb3ee841
commit d18e37166d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -17,10 +17,9 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y gnupg2
$STD apt-get install -y ca-certificates
$STD apt-get install -y gpg
$STD apt-get install -y apt-transport-https
$STD apt-get install -y lsb-release
$STD apt-get install -y debian-archive-keyring
msg_ok "Installed Dependencies"
msg_info "Installing Nginx"
@ -31,9 +30,11 @@ $STD apt-get install -y nginx
msg_ok "Installed Nginx"
RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing BunkerWeb v${RELEASE}"
msg_info "Installing BunkerWeb v${RELEASE} (Patience)"
curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list
$STD apt-get update
export UI_WIZARD=1
curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null
$STD apt-get install -y bunkerweb=${RELEASE}
cat <<EOF >/etc/apt/preferences.d/bunkerweb
Package: bunkerweb