version.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. if [ $VERSION = "0.9.8-25" ] || [ $VERSION = "0.9.8-26" ] || [ $VERSION = "0.9.8-27" ] || [ $VERSION = "0.9.8-28" ]; then
  19. source /usr/local/hestia/install/upgrade/versions/0.9.8-29.sh
  20. VERSION="0.9.8-29"
  21. fi
  22. if [ $VERSION = "0.9.8-29" ]; then
  23. source /usr/local/hestia/install/upgrade/versions/1.00.0-190618.sh
  24. VERSION="1.00.0-190618"
  25. fi
  26. if [ $VERSION = "0.10.00" ] || [ $VERSION = "1.00.0-190618" ] || [ $VERSION = "1.00.0-190621" ]; then
  27. source /usr/local/hestia/install/upgrade/versions/1.0.1.sh
  28. VERSION="1.0.1"
  29. fi
  30. if [ $VERSION = "1.0.1" ]; then
  31. source /usr/local/hestia/install/upgrade/versions/1.0.2.sh
  32. VERSION="1.0.2"
  33. fi
  34. if [ $VERSION = "1.0.2" ]; then
  35. source /usr/local/hestia/install/upgrade/versions/1.0.3.sh
  36. VERSION="1.0.3"
  37. fi
  38. if [ $VERSION = "1.0.3" ]; then
  39. source /usr/local/hestia/install/upgrade/versions/$version.sh
  40. VERSION="$version"
  41. fi