Skip to content

Commit

Permalink
Update Webmin script
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Oct 3, 2024
1 parent 396f005 commit 88604cb
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions apps/webmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/

# shellcheck disable=2034,2059
true
SCRIPT_NAME="Webmin"
SCRIPT_EXPLAINER="Webmin is a web-based interface for system administration for Unix.
Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more.
Using any modern web browser, you can set up user accounts, Apache, DNS, file sharing and much more.
Webmin removes the need to manually edit Unix configuration files like /etc/passwd, \
and lets you manage a system from the console or remotely.
See the following page with standard modules for a list of all the functions built into Webmin: \
Expand All @@ -33,7 +32,13 @@ else
reinstall_remove_menu "$SCRIPT_NAME"
# Removal
check_command apt-get purge webmin -y
rm -rf /etc/apt/sources.list.d/webmin.list
apt-get autoremove -y
rm -f /etc/apt/sources.list.d/webmin.list
rm -f /etc/apt/trusted.gpg.d/webmin.gpg
rm -f /etc/apt/keyrings/jcameron-key.asc
sed -i '/webmin/d' /etc/apt/sources.list
apt-get clean all
apt-get update
# Show successful uninstall if applicable
removal_popup "$SCRIPT_NAME"
fi
Expand All @@ -48,13 +53,37 @@ install_if_not libpam-runtime
install_if_not libio-pty-perl
install_if_not apt-show-versions
install_if_not python2
install_if_not unzip
install_if_not shared-mime-info
install_if_not zip

# https://github.com/webmin/webmin/issues/1169
apt-get clean all
apt-get update -q4 & spinner_loading

# Install Webmin
if curl -fsSL http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
if curl_to_dir http://www.webmin.com "jcameron-key.asc" /tmp
then
# Use the original key URL
add_trusted_key_and_repo "jcameron-key.asc" \
"https://download.webmin.com" \
"https://download.webmin.com/download/repository" \
"sarge contrib" \
"webmin.list"
else
# Use backup key URL
add_trusted_key_and_repo "jcameron-key.asc" \
"https://gist.githubusercontent.com/enoch85/092c8f4c4f5127b99d40/raw/186333393163b7e0d50c8d3b25cae4d63ac78b22" \
"https://download.webmin.com/download/repository" \
"sarge contrib" \
"webmin.list"
fi
install_if_not webmin

if ! dpkg-query -W -f='${Status}' "webmin" | grep -q "ok installed"
then
echo "deb https://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
apt update -q4 & spinner_loading
install_if_not webmin
wget http://prdownloads.sourceforge.net/webadmin/webmin_2.010_all.deb
dpkg --install webmin_2.010_all.deb
fi

print_text_in_color "$ICyan" "Configuring Webmin..."
Expand Down

0 comments on commit 88604cb

Please sign in to comment.