Skip to content

Commit

Permalink
Add support to force reinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Sep 28, 2024
1 parent 1e593ff commit c4b340f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -148,6 +149,10 @@ parse_args() {
shift
skipyesno=1
;;
--force-reinstall | -fr)
shift
forcereinstall=1
;;
--no-banner | -nb)
shift
skipbanner=1
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c4b340f

Please sign in to comment.