2
2
3
3
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
4
4
5
- # shellcheck disable=2034,2059
6
5
true
7
6
SCRIPT_NAME=" Webmin"
8
7
SCRIPT_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.
10
9
Webmin removes the need to manually edit Unix configuration files like /etc/passwd, \
11
10
and lets you manage a system from the console or remotely.
12
11
See the following page with standard modules for a list of all the functions built into Webmin: \
33
32
reinstall_remove_menu " $SCRIPT_NAME "
34
33
# Removal
35
34
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
37
42
# Show successful uninstall if applicable
38
43
removal_popup " $SCRIPT_NAME "
39
44
fi
@@ -48,13 +53,37 @@ install_if_not libpam-runtime
48
53
install_if_not libio-pty-perl
49
54
install_if_not apt-show-versions
50
55
install_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
51
63
52
64
# 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"
54
84
then
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
58
87
fi
59
88
60
89
print_text_in_color " $ICyan " " Configuring Webmin..."
0 commit comments