22
33# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44
5- # shellcheck disable=2034,2059
65true
76SCRIPT_NAME=" Webmin"
87SCRIPT_EXPLAINER=" Webmin is a web-based interface for system administration for Unix.
9- Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more.
8+ Using any modern web browser, you can set up user accounts, Apache, DNS, file sharing and much more.
109Webmin removes the need to manually edit Unix configuration files like /etc/passwd, \
1110and lets you manage a system from the console or remotely.
1211See the following page with standard modules for a list of all the functions built into Webmin: \
3332 reinstall_remove_menu " $SCRIPT_NAME "
3433 # Removal
3534 check_command apt-get purge webmin -y
36- rm -rf /etc/apt/sources.list.d/webmin.list
35+ apt-get autoremove -y
36+ rm -f /etc/apt/sources.list.d/webmin.list
37+ rm -f /etc/apt/trusted.gpg.d/webmin.gpg
38+ rm -f /etc/apt/keyrings/jcameron-key.asc
39+ sed -i ' /webmin/d' /etc/apt/sources.list
40+ apt-get clean all
41+ apt-get update
3742 # Show successful uninstall if applicable
3843 removal_popup " $SCRIPT_NAME "
3944fi
@@ -48,13 +53,37 @@ install_if_not libpam-runtime
4853install_if_not libio-pty-perl
4954install_if_not apt-show-versions
5055install_if_not python2
56+ install_if_not unzip
57+ install_if_not shared-mime-info
58+ install_if_not zip
59+
60+ # https://github.com/webmin/webmin/issues/1169
61+ apt-get clean all
62+ apt-get update -q4 & spinner_loading
5163
5264# Install Webmin
53- if curl -fsSL http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
65+ if curl_to_dir http://www.webmin.com " jcameron-key.asc" /tmp
66+ then
67+ # Use the original key URL
68+ add_trusted_key_and_repo " jcameron-key.asc" \
69+ " https://download.webmin.com" \
70+ " https://download.webmin.com/download/repository" \
71+ " sarge contrib" \
72+ " webmin.list"
73+ else
74+ # Use backup key URL
75+ add_trusted_key_and_repo " jcameron-key.asc" \
76+ " https://gist.githubusercontent.com/enoch85/092c8f4c4f5127b99d40/raw/186333393163b7e0d50c8d3b25cae4d63ac78b22" \
77+ " https://download.webmin.com/download/repository" \
78+ " sarge contrib" \
79+ " webmin.list"
80+ fi
81+ install_if_not webmin
82+
83+ if ! dpkg-query -W -f=' ${Status}' " webmin" | grep -q " ok installed"
5484then
55- echo " deb https://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
56- apt update -q4 & spinner_loading
57- install_if_not webmin
85+ wget http://prdownloads.sourceforge.net/webadmin/webmin_2.010_all.deb
86+ dpkg --install webmin_2.010_all.deb
5887fi
5988
6089print_text_in_color " $ICyan " " Configuring Webmin..."
0 commit comments