Skip to content

Commit 965da58

Browse files
committed
Fix force setup using env variable safer than filename
1 parent 0315e4c commit 965da58

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

virtualmin-install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,9 @@ if [ -n "$test_connection_type" ]; then
494494
exit 0
495495
fi
496496

497-
# Force setup mode, if script name is `setup-repos.sh` as it
498-
# is used by Virtualmin API, to make sure users won't run an
499-
# actual install script under any circumstances
500-
if [ "$script_name" = "setup-repos.sh" ]; then
497+
# Force setup mode when VIRTUALMIN_SETUP_ONLY is set, ensuring users will not
498+
# run an actual install script under any circumstances
499+
if [ "${VIRTUALMIN_SETUP_ONLY:-}" = "1" ]; then
501500
setup_only=1
502501
mode='setup'
503502
unstable='unstable'

0 commit comments

Comments
 (0)