Skip to content

Commit

Permalink
Fix to check if there is an active license exists
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jun 6, 2022
1 parent 7c669b7 commit 58c110b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,20 @@ if [ -x /usr/bin/apt-get ]; then
fi
fi

# If Pro user downloads GPL version of `install.sh` script
# to fix repos check if there is an active license exists
if [ -n "$setup_only" ]; then
if [ -f /etc/virtualmin-license ]; then
virtualmin_license_existing_serial="$(grep 'SerialNumber=' /etc/virtualmin-license | sed 's/SerialNumber=//')"
virtualmin_license_existing_key="$(grep 'LicenseKey=' /etc/virtualmin-license | sed 's/LicenseKey=//')"
if [ -n "$virtualmin_license_existing_serial" ] && [ -n "$virtualmin_license_existing_key" ]; then
SERIAL="$virtualmin_license_existing_serial"
KEY="$virtualmin_license_existing_key"
fi

fi
fi

arch="$(uname -m)"
if [ "$arch" = "i686" ]; then
arch="i386"
Expand Down

0 comments on commit 58c110b

Please sign in to comment.