2024-05-24 01:39:30 +00: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
|
|
|
|
$STD apt-get install -y gnupg2
|
|
|
|
$STD apt-get install -y ca-certificates
|
|
|
|
$STD apt-get install -y lsb-release
|
|
|
|
$STD apt-get install -y debian-archive-keyring
|
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
2024-07-03 13:21:41 +00:00
|
|
|
msg_info "Installing Nginx"
|
2024-05-24 01:39:30 +00:00
|
|
|
wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg
|
2024-07-03 13:38:44 +00: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-24 01:39:30 +00:00
|
|
|
$STD apt-get update
|
2024-07-03 13:21:41 +00:00
|
|
|
$STD apt-get install -y nginx
|
|
|
|
msg_ok "Installed Nginx"
|
2024-05-24 01:39:30 +00:00
|
|
|
|
2024-07-03 13:21:41 +00: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-03 13:38:44 +00:00
|
|
|
msg_info "Installing BunkerWeb v${RELEASE}"
|
2024-05-24 01:39:30 +00:00
|
|
|
export UI_WIZARD=1
|
2024-05-24 01:43:30 +00:00
|
|
|
curl -sSL https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh | bash &>/dev/null
|
2024-07-03 13:38:44 +00:00
|
|
|
$STD apt-get install -y bunkerweb=${RELEASE}
|
2024-07-03 13:21:41 +00:00
|
|
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
2024-07-03 13:38:44 +00:00
|
|
|
msg_ok "Installed BunkerWeb v${RELEASE}"
|
2024-05-24 01:39:30 +00:00
|
|
|
|
|
|
|
motd_ssh
|
|
|
|
customize
|
|
|
|
|
|
|
|
msg_info "Cleaning up"
|
|
|
|
$STD apt-get -y autoremove
|
|
|
|
$STD apt-get -y autoclean
|
|
|
|
msg_ok "Cleaned"
|