From c4b340fb7ae010abbde2eefda035baed2d8ad573 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sat, 28 Sep 2024 23:09:48 +0300 Subject: [PATCH] Add support to force reinstall --- virtualmin-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/virtualmin-install.sh b/virtualmin-install.sh index aa2d824..dc1d194 100644 --- a/virtualmin-install.sh +++ b/virtualmin-install.sh @@ -53,6 +53,7 @@ usage() { printf " --uninstall|-u remove all Virtualmin packages and dependencies\\n" echo printf " --force|-f|--yes|-y assume \"yes\" to all prompts\\n" + printf " --force-reinstall|-fr force reinstall Virtualmin (not recommended)\\n" printf " --no-banner|-nb suppress installation messages and warnings\\n" printf " --verbose|-v enable verbose mode\\n" printf " --version|-V show installer version\\n" @@ -148,6 +149,10 @@ parse_args() { shift skipyesno=1 ;; + --force-reinstall | -fr) + shift + forcereinstall=1 + ;; --no-banner | -nb) shift skipbanner=1 @@ -408,7 +413,7 @@ fi LOG_LEVEL_LOG="DEBUG" # If already installed successfully, do not allow running again -if [ -f "/etc/webmin/virtual-server/installed-auto" ] && [ -z "$setup_only" ] && [ "$skipyesno" -ne 1 ]; then +if [ -f "/etc/webmin/virtual-server/installed-auto" ] && [ -z "$setup_only" ] && [ -z "$forcereinstall" ]; then bind_hook "already_installed_block" fi if [ -n "$setup_only" ]; then