|
|
@@ -28,19 +28,20 @@ php_fpm="/etc/init.d/php$version-fpm"
|
|
|
|
|
|
# Verify php version format
|
|
|
if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
|
|
|
- echo "The php version format is invalid, it should look like [0-9].[0-9]..."
|
|
|
+ echo "The specified PHP version format is invalid, it should look like [0-9].[0-9]."
|
|
|
+ echo "Example: 7.0, 7.4"
|
|
|
exit
|
|
|
fi
|
|
|
|
|
|
# Check if php version already exists
|
|
|
if [ -f "$php_fpm" ] && [ -f "$HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl" ]; then
|
|
|
- echo "Version already installed..."
|
|
|
+ echo "ERROR: Specified PHP version is already installed."
|
|
|
exit
|
|
|
fi
|
|
|
|
|
|
# Check if php version is supported
|
|
|
if [ ! -f "$HESTIA_INSTALL_DIR/multiphp/$WEB_SYSTEM/PHP-${version//.}.sh" ]; then
|
|
|
- echo "Version is currently not supported or does not exist..."
|
|
|
+ echo "ERROR: Specified PHP version is not supported or does not exist."
|
|
|
exit
|
|
|
fi
|
|
|
|
|
|
@@ -77,7 +78,7 @@ apt-get -y -qq -o Dpkg::Options::="--force-confold" install $mph > /dev/null 2>&
|
|
|
BACK_PID=$!
|
|
|
|
|
|
# Check if package installation is done, print a spinner
|
|
|
-echo "Install PHP-$version, please wait..."
|
|
|
+echo "Installing PHP-$version, please wait..."
|
|
|
spinner="/-\|"
|
|
|
spin_i=1
|
|
|
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
|
|
|
@@ -90,7 +91,7 @@ echo
|
|
|
|
|
|
# Check if installation was sucessfully
|
|
|
if [ ! -f "$php_fpm" ]; then
|
|
|
- echo "Installation failed, please run the following command manualy for debuging:"
|
|
|
+ echo "ERROR: Installation failed, please run the following command manually for debugging:"
|
|
|
echo "apt-get install $mph"
|
|
|
fi
|
|
|
|