Skip to content

Commit

Permalink
Add fool-proof solution to support repo setup mode in Virtualmin API
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Dec 5, 2023
1 parent 49b5c3e commit 2d6fa28
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d6fa28

Please sign in to comment.