webmin.sh 1.3 KB

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