1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 11:22:42 +01:00

Check PHP version in update script

This commit is contained in:
FreeScout 2018-11-11 08:46:27 -08:00
parent f1b460be65
commit f1214bcaba

View File

@ -7,6 +7,15 @@
DATE_TIME=`date +%Y-%m-%d_%H:%M:%S`
echo -e "Starting upgrading: \e[32m${DATE_TIME}\e[0m";
# Check PHP version
php_v=`php -v | grep 'PHP 7' | wc -l`
if [ $php_v != 1 ]; then
echo -e "\e[32mChecking PHP version...\e[0m";
php -v
echo -e "\e[31mInvalid PHP version (PHP 7.x is required)\e[0m";
exit;
fi
echo -e "\e[33mMake sure to create a backup of the application before you continue.\e[0m";
# Determine project root