diff options
author | szaimen <szaimen@e.mail.de> | 2020-09-15 10:41:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-15 10:41:22 +0300 |
commit | adb15b35bdba8eab2361eaed302eef30c935a8e0 (patch) | |
tree | 900899516e131302ada6186f4aa7eed25c37acb2 /apps/webmin.sh | |
parent | d6920095d010879799959b3a793e07fd74562cfd (diff) |
webmin - use the new reinstall-functions and smaller fixes (#1457)
Diffstat (limited to 'apps/webmin.sh')
-rw-r--r-- | apps/webmin.sh | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/apps/webmin.sh b/apps/webmin.sh index f9720adb..6f2268e4 100644 --- a/apps/webmin.sh +++ b/apps/webmin.sh @@ -5,6 +5,10 @@ # 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. +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: https://webmin.com/standard.html" # shellcheck source=lib.sh . <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh) @@ -17,28 +21,20 @@ debug_mode # Check if root root_check +# Show explainer +explainer_popup + # Check if webmin is already installed print_text_in_color "$ICyan" "Checking if Webmin is already installed..." if is_this_installed webmin then - choice=$(whiptail --title "$TITLE" --menu "It seems like 'Webmin' is already installed.\nChoose what you want to do." "$WT_HEIGHT" "$WT_WIDTH" 4 \ - "Reinstall Webmin" "" \ - "Uninstall Webmin" "" 3>&1 1>&2 2>&3) - - case "$choice" in - "Uninstall Webmin") - print_text_in_color "$ICyan" "Uninstalling Webmin..." - check_command apt --purge autoremove -y webmin - msg_box "Webmin was successfully uninstalled." - exit - ;; - "Reinstall Webmin") - print_text_in_color "$ICyan" "Reinstalling Webmin..." - check_command apt-get purge webmin -y - ;; - *) - ;; - esac + # Ask for removal or reinstallation + reinstall_remove_menu + # Removal + check_command apt-get purge webmin -y + rm -rf /etc/apt/sources.list.d/webmin.list + # Show successful uninstall if applicable + removal_popup else print_text_in_color "$ICyan" "Installing Webmin..." fi |