From 235d58f385a105c03f8cde0df6efd26692ad801f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 12 May 2025 15:10:20 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 1573c79b..514a6611 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -272,7 +272,11 @@ install_php() { COMBINED_MODULES=$(echo "$COMBINED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -) local CURRENT_PHP - CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) + if command -v php >/dev/null 2>&1; then + CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) + else + CURRENT_PHP="" + fi if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then $STD echo "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" @@ -676,7 +680,6 @@ fetch_and_deploy_gh_release() { rm -rf "$tmpdir" } - setup_local_ip_helper() { local BASE_DIR="/usr/local/community-scripts/ip-management" local SCRIPT_PATH="$BASE_DIR/update_local_ip.sh"