ProxmoxHelperScripts/misc/webmin.sh

45 lines
1.3 KiB
Bash
Raw Normal View History

2022-01-19 02:10:02 +01:00
#!/usr/bin/env bash
2022-02-19 10:47:36 +01:00
2023-02-07 18:15:22 +01:00
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
2022-10-30 02:04:45 +01:00
YW=$(echo "\033[33m")
RD=$(echo "\033[01;31m")
BL=$(echo "\033[36m")
2022-02-19 10:38:20 +01:00
CM='\xE2\x9C\x94\033'
2022-10-30 02:04:45 +01:00
GN=$(echo "\033[1;92m")
CL=$(echo "\033[m")
2022-01-19 02:10:02 +01:00
while true; do
read -p "This will Install Webmin, Proceed(y/n)?" yn
case $yn in
2022-10-30 02:04:45 +01:00
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
2022-01-19 02:10:02 +01:00
esac
done
2022-02-19 10:38:20 +01:00
clear
echo -en "${GN} Installing Prerequisites... "
2022-01-19 02:10:02 +01:00
apt update &>/dev/null
apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip shared-mime-info &>/dev/null
2022-02-19 10:38:20 +01:00
echo -e "${CM}${CL} \r"
echo -en "${GN} Downloading Webmin... "
wget http://prdownloads.sourceforge.net/webadmin/webmin_2.000_all.deb &>/dev/null
2022-02-19 10:38:20 +01:00
echo -e "${CM}${CL} \r"
2022-02-19 10:50:15 +01:00
echo -en "${GN} Installing Webmin... "
dpkg --install webmin_2.000_all.deb &>/dev/null
2022-02-19 10:38:20 +01:00
echo -e "${CM}${CL} \r"
2022-02-19 10:50:15 +01:00
echo -en "${GN} Setting Default Webmin usermame & password to root... "
2022-01-19 02:10:02 +01:00
/usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null
rm -rf /root/webmin_2.000_all.deb
2022-02-19 10:38:20 +01:00
echo -e "${CM}${CL} \r"
2022-02-19 16:03:10 +01:00
IP=$(hostname -I | cut -f1 -d ' ')
2022-10-30 02:04:45 +01:00
echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000"
2022-01-19 02:10:02 +01:00
# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)"