diff --git a/misc/tools.func b/misc/tools.func index c719db2..fcfbdd2 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -353,11 +353,12 @@ install_php() { CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) else CURRENT_PHP="" - msg_info "Setup PHP: $PHP_VERSION" fi - if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then - $STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" + if [[ -z "$CURRENT_PHP" ]]; then + msg_info "Setup PHP $PHP_VERSION" + elif [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then + msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then $STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb