301301# Welcome message
302302echo " Welcome to the Hestia Control Panel installer!"
303303echo
304- echo " Please wait a moment while we update your system's repositories and"
305- echo " install any necessary dependencies required to proceed with the installation..."
304+ echo " Please wait, the installer is now checking for missing dependencies..."
306305echo
307306
308307# Update apt repository
@@ -413,6 +412,25 @@ if [ -d /etc/netplan ] && [ -z "$force" ]; then
413412 fi
414413fi
415414
415+ # Validate whether installation script matches release version before continuing with install
416+ if [ -z " $withdebs " ] || [ ! -d " $withdebs " ]; then
417+ release_branch_ver=$( curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/release/src/deb/hestia/control | grep " Version:" | awk ' {print $2}' )
418+ if [ " $HESTIA_INSTALL_VER " != " $release_branch_ver " ]; then
419+ echo
420+ echo -e " \e[91mInstallation aborted\e[0m"
421+ echo " ===================================================================="
422+ echo -e " \e[33mERROR: Install script version does not match package version!\e[0m"
423+ echo -e " \e[33mPlease download the installer from the release branch in order to continue:\e[0m"
424+ echo " "
425+ echo -e " \e[33mhttps://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh\e[0m"
426+ echo " "
427+ echo -e " \e[33mTo test pre-release versions, build the .deb packages and re-run the installer:\e[0m"
428+ echo -e " \e[33m./hst_autocompile.sh \e[1m--hestia no\e[21m\e[0m"
429+ echo -e " \e[33m./hst-install.sh .. \e[1m--with-debs /tmp/hestiacp-src/debs\e[21m\e[0m"
430+ echo " "
431+ check_result 1 " Installation aborted"
432+ fi
433+ fi
416434
417435# ----------------------------------------------------------#
418436# Brief Info #
@@ -432,7 +450,7 @@ echo " v${HESTIA_INSTALL_VER}"
432450echo -e " \n"
433451echo " ===================================================================="
434452echo -e " \n"
435- echo ' The following server components will be installed on your system :'
453+ echo ' The following components will be installed on your server :'
436454echo
437455
438456# Web stack
833851# Install packages #
834852# ----------------------------------------------------------#
835853
836- if [ -z " $withdebs " ] || [ ! -d " $withdebs " ]; then
837- release_branch_ver=$( curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/release/src/deb/hestia/control | grep " Version:" | awk ' {print $2}' )
838- if [ " $HESTIA_INSTALL_VER " != " $release_branch_ver " ]; then
839- echo
840- echo -e " \e[91mInstallation Aborted\e[0m"
841- echo " ===================================================================="
842- echo -e " \e[33mInstall script does not match Hestia release version\e[0m"
843- echo -e " \e[33mPlease use the installer from the release branch\e[0m"
844- echo " "
845- echo -e " \e[33mTo test the beta version you need to build the hestia deb packages and re-run the installer\e[0m"
846- echo -e " \e[33m./hst_autocompile.sh \e[1m--hestia no\e[21m\e[0m"
847- echo -e " \e[33m./hst-install.sh .. \e[1m--with-debs /tmp/hestiacp-src/debs\e[21m\e[0m"
848- check_result 1 " Installation aborted"
849- fi
850- fi
851-
852854# Disabling daemon autostart on apt-get install
853855echo -e ' #!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
854856chmod a+x /usr/sbin/policy-rc.d
0 commit comments