version.sh 1.1 KB

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # Add release branch system configuration if non-existent
  3. release_branch_check=$(cat $HESTIA/conf/hestia.conf | grep RELEASE_BRANCH)
  4. if [ -z "$release_branch_check" ]; then
  5. echo "(*) Adding global release branch variable to system configuration..."
  6. sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
  7. echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
  8. fi
  9. # Step through version upgrade scripts in order as necessary to ensure that systems
  10. # are properly upgraded if skipping versions.
  11. if [ $VERSION = "$version" ]; then
  12. echo "(!) The latest version of Hestia Control Panel ($version) is already installed."
  13. echo " Verifying configuration..."
  14. echo ""
  15. source /usr/local/hestia/install/upgrade/versions/$version.sh
  16. VERSION="$version"
  17. fi
  18. # Upgrade from pre-release/beta versions prior to v1.0.1
  19. if [ $VERSION = "0.9.8-27" ] || [ $VERSION = "0.9.8-28" ] || [ $VERSION = "0.10.0" ] || [ $VERSION = "1.00.0-190618" ] || [ $VERSION = "1.00.0-190621" ]; then
  20. source /usr/local/hestia/install/upgrade/versions/$version.sh
  21. VERSION="$version"
  22. fi