From f50126511a4d224f50b40957f40b02b79eceaba9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 15 May 2025 15:47:10 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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