Fix error on upgrade_roundcube.sh: minor changes on script output.

This commit is contained in:
Christoph 2017-11-09 02:57:43 +01:00
parent 2a39aa5f12
commit 86d6099516

View File

@ -356,7 +356,7 @@ fi
# - Determin PHP of all installed versions # - Determin PHP of all installed versions
# - # -
echononl "\tGet major version of all installed PHP versions" echononl " Get major version of all installed PHP versions"
if $PHP_DEBIAN_INSTALLATION ; then if $PHP_DEBIAN_INSTALLATION ; then
php_major_version="$(php --version | head -1 | cut -d' ' -f2 | cut -d '-' -f1 | cut -d'.' -f1,2)" php_major_version="$(php --version | head -1 | cut -d' ' -f2 | cut -d '-' -f1 | cut -d'.' -f1,2)"
else else
@ -371,9 +371,9 @@ fi
# - Stop all PHP FPM engines # - Stop all PHP FPM engines
# - # -
echononl " Stop PHP FPM engine v${_ver}.."
if [[ -n "$php_major_versions" ]]; then if [[ -n "$php_major_versions" ]]; then
for _ver in $php_major_versions ; do for _ver in $php_major_versions ; do
echononl " Stop PHP FPM engine v${_ver}.."
if [[ -f "/etc/init.d/php-${_ver}-fpm" ]]; then if [[ -f "/etc/init.d/php-${_ver}-fpm" ]]; then
/etc/init.d/php-${_ver}-fpm stop > $log_file 2>&1 /etc/init.d/php-${_ver}-fpm stop > $log_file 2>&1
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
@ -396,13 +396,9 @@ if [[ -n "$php_major_versions" ]]; then
done done
else else
if $PHP_DEBIAN_INSTALLATION ; then if $PHP_DEBIAN_INSTALLATION ; then
if [[ -f "/etc/init.d/php5-fpm" ]] ; then echononl " Stop PHP FPM engine v${php_major_version}.."
/etc/init.d/php5-fpm stop > $log_file 2>&1 if [[ -f "/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm" ]] ; then
elif [[ -f "/etc/init.d/php7-fpm" ]] ; then /etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm stop > $log_file 2>&1
/etc/init.d/php7-fpm stop > $log_file 2>&1
else
echo_skipped
fi
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo_ok echo_ok
else else
@ -412,6 +408,9 @@ else
else else
echo_skipped echo_skipped
fi fi
else
echo_skipped
fi
fi fi
echo -e "\n\n \033[37m\033[1mUgrade Roundcube Webmail..\033[m\n" echo -e "\n\n \033[37m\033[1mUgrade Roundcube Webmail..\033[m\n"