Skip to content

Commit dc2e1ff

Browse files
author
Kristan Kenney
committed
Merge branch 'refactor/scripts' into staging/fixes
2 parents 487db09 + 6984b4a commit dc2e1ff

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

bin/v-add-web-php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ php_fpm="/etc/init.d/php$version-fpm"
2828

2929
# Verify php version format
3030
if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
31-
echo "The php version format is invalid, it should look like [0-9].[0-9]..."
31+
echo "The specified PHP version format is invalid, it should look like [0-9].[0-9]."
32+
echo "Example: 7.0, 7.4"
3233
exit
3334
fi
3435

3536
# Check if php version already exists
3637
if [ -f "$php_fpm" ] && [ -f "$HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl" ]; then
37-
echo "Version already installed..."
38+
echo "ERROR: Specified PHP version is already installed."
3839
exit
3940
fi
4041

4142
# Check if php version is supported
4243
if [ ! -f "$HESTIA_INSTALL_DIR/multiphp/$WEB_SYSTEM/PHP-${version//.}.sh" ]; then
43-
echo "Version is currently not supported or does not exist..."
44+
echo "ERROR: Specified PHP version is not supported or does not exist."
4445
exit
4546
fi
4647

@@ -77,7 +78,7 @@ apt-get -y -qq -o Dpkg::Options::="--force-confold" install $mph > /dev/null 2>&
7778
BACK_PID=$!
7879

7980
# Check if package installation is done, print a spinner
80-
echo "Install PHP-$version, please wait..."
81+
echo "Installing PHP-$version, please wait..."
8182
spinner="/-\|"
8283
spin_i=1
8384
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
@@ -90,7 +91,7 @@ echo
9091

9192
# Check if installation was sucessfully
9293
if [ ! -f "$php_fpm" ]; then
93-
echo "Installation failed, please run the following command manualy for debuging:"
94+
echo "ERROR: Installation failed, please run the following command manually for debugging:"
9495
echo "apt-get install $mph"
9596
fi
9697

bin/v-delete-web-php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ php_fpm="/etc/init.d/php$version-fpm"
2828

2929
# Verify php version format
3030
if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
31-
echo "The php version format is invalid, it should look like [0-9].[0-9]..."
31+
echo "The PHP version format is invalid, it should look like [0-9].[0-9]."
32+
echo "Example: 7.0, 7.4"
3233
exit
3334
fi
3435

@@ -37,7 +38,7 @@ fi
3738

3839
# Check if php version exists
3940
if [ ! -f "$php_fpm" ] && [ ! -f "$HESTIA/data/templates/$WEB_SYSTEM/PHP-$version.sh" ]; then
40-
echo "Version is not installed..."
41+
echo "ERROR: Specified PHP version is not installed."
4142
exit
4243
fi
4344

@@ -77,7 +78,7 @@ echo
7778

7879
# Check if installation was sucessfully
7980
if [ -f "$php_fpm" ]; then
80-
echo "Uninstallation failed, please run the following command manualy for debuging:"
81+
echo "ERROR: Uninstallation failed, please run the following command manually for debugging:"
8182
echo "apt-get purge $mph"
8283
fi
8384

bin/v-list-sys-php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ csv_list() {
6161
# Action #
6262
#----------------------------------------------------------#
6363

64-
# List trough /etc/php
64+
# List through /etc/php
6565
versions_list=$(ls -d /etc/php/*)
6666
versions=()
6767
for version in $versions_list; do

0 commit comments

Comments
 (0)