diff --git a/virtualmin-install.sh b/virtualmin-install.sh index 696b999..984e476 100644 --- a/virtualmin-install.sh +++ b/virtualmin-install.sh @@ -140,6 +140,15 @@ while [ "$1" != "" ]; do esac done +# Force setup mode, if script name is `setup-repos.sh` as it +# is used by Virtualmin API, to make sure users won't run an +# actuall install script under any circumstances +if [ "${0##*/}" = "setup-repos.sh" ]; then + setup_only=1 + mode='setup' + unstable='unstable' +fi + # Store new log each time log="$pwd/$log_type.log" if [ -e "$log" ]; then