2024-05-23 21:39:30 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Copyright (c) 2021-2024 tteck
|
|
|
|
# Author: tteck (tteckster)
|
|
|
|
# License: MIT
|
|
|
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
|
|
|
|
|
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
|
|
|
color
|
|
|
|
verb_ip6
|
|
|
|
catch_errors
|
|
|
|
setting_up_container
|
|
|
|
network_check
|
|
|
|
update_os
|
|
|
|
|
|
|
|
msg_info "Installing Dependencies"
|
|
|
|
$STD apt-get install -y curl
|
|
|
|
$STD apt-get install -y sudo
|
|
|
|
$STD apt-get install -y mc
|
2024-07-22 06:39:34 -04:00
|
|
|
$STD apt-get install -y gpg
|
|
|
|
$STD apt-get install -y apt-transport-https
|
2024-05-23 21:39:30 -04:00
|
|
|
$STD apt-get install -y lsb-release
|
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
2024-07-03 09:21:41 -04:00
|
|
|
msg_info "Installing Nginx"
|
2024-05-23 21:39:30 -04:00
|
|
|
wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg
|
2024-07-03 09:38:44 -04:00
|
|
|
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list
|
2024-05-23 21:39:30 -04:00
|
|
|
$STD apt-get update
|
2024-10-21 12:59:55 -04:00
|
|
|
$STD apt-get install -y nginx=1.26.2*
|
2024-07-03 09:21:41 -04:00
|
|
|
msg_ok "Installed Nginx"
|
2024-05-23 21:39:30 -04:00
|
|
|
|
2024-07-03 09:21:41 -04:00
|
|
|
RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
2024-07-22 06:39:34 -04:00
|
|
|
msg_info "Installing BunkerWeb v${RELEASE} (Patience)"
|
2024-08-07 11:27:19 -04:00
|
|
|
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
|
2024-07-22 06:39:34 -04:00
|
|
|
$STD apt-get update
|
2024-05-23 21:39:30 -04:00
|
|
|
export UI_WIZARD=1
|
2024-07-03 09:38:44 -04:00
|
|
|
$STD apt-get install -y bunkerweb=${RELEASE}
|
2024-07-03 10:22:46 -04:00
|
|
|
cat <<EOF >/etc/apt/preferences.d/bunkerweb
|
|
|
|
Package: bunkerweb
|
|
|
|
Pin: version ${RELEASE}
|
|
|
|
Pin-Priority: 1001
|
|
|
|
EOF
|
2024-07-03 09:21:41 -04:00
|
|
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
2024-07-03 09:38:44 -04:00
|
|
|
msg_ok "Installed BunkerWeb v${RELEASE}"
|
2024-05-23 21:39:30 -04:00
|
|
|
|
|
|
|
motd_ssh
|
|
|
|
customize
|
|
|
|
|
|
|
|
msg_info "Cleaning up"
|
|
|
|
$STD apt-get -y autoremove
|
|
|
|
$STD apt-get -y autoclean
|
|
|
|
msg_ok "Cleaned"
|