1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-01 09:50:29 +02:00
Proxmox/misc/webmin.sh

62 lines
1.6 KiB
Bash
Raw Normal View History

2022-01-19 03:10:02 +02:00
#!/usr/bin/env bash
2022-02-19 11:47:36 +02:00
2024-01-01 19:13:05 +02:00
# Copyright (c) 2021-2024 tteck
2023-02-07 19:15:22 +02:00
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
2023-10-27 18:21:36 +02:00
function header_info {
clear
cat <<"EOF"
_ __ __ _
| | /| / /__ / / __ _ (_)__
| |/ |/ / -_) _ \/ ' \/ / _ \
|__/|__/\__/_.__/_/_/_/_/_//_/
EOF
}
set -eEuo pipefail
2022-10-30 03:04:45 +02:00
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
2023-10-27 18:21:36 +02:00
BGN=$(echo "\033[4;92m")
2022-10-30 03:04:45 +02:00
GN=$(echo "\033[1;92m")
2023-10-27 18:21:36 +02:00
DGN=$(echo "\033[32m")
2022-10-30 03:04:45 +02:00
CL=$(echo "\033[m")
2023-10-27 18:21:36 +02:00
CM="${GN}${CL}"
BFR="\\r\\033[K"
HOLD="-"
msg_info() {
local msg="$1"
echo -ne " ${HOLD} ${YW}${msg}..."
}
msg_ok() {
local msg="$1"
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
}
header_info
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Webmin Installer" --yesno "This Will Install Webmin on this LXC Container. Proceed?" 10 58 || exit
msg_info "Installing Prerequisites"
2022-01-19 03:10:02 +02:00
apt update &>/dev/null
apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip shared-mime-info &>/dev/null
2023-10-27 18:21:36 +02:00
msg_ok "Installed Prerequisites"
2022-02-19 11:38:20 +02:00
2023-10-27 18:21:36 +02:00
LATEST=$(curl -sL https://api.github.com/repos/webmin/webmin/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
2022-02-19 11:38:20 +02:00
2023-10-27 18:21:36 +02:00
msg_info "Downloading Webmin"
wget -q https://github.com/webmin/webmin/releases/download/$LATEST/webmin_${LATEST}_all.deb
msg_ok "Downloaded Webmin"
2022-02-19 11:38:20 +02:00
2023-10-27 18:21:36 +02:00
msg_info "Installing Webmin"
dpkg -i webmin_${LATEST}_all.deb &>/dev/null
2022-01-19 03:10:02 +02:00
/usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null
2023-10-27 18:21:36 +02:00
rm -rf /root/webmin_${LATEST}_all.deb
msg_ok "Installed Webmin"
2022-01-19 03:10:02 +02:00
2023-10-27 18:21:36 +02:00
IP=$(hostname -I | cut -f1 -d ' ')
echo -e "Successfully Installed!! Webmin should be reachable by going to ${BL}https://${IP}:10000${CL}"