From 3d357340aed84cdf83d2a82dd79e3d5c79ae2ede Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2026 07:11:29 +0000 Subject: [PATCH] Output the service name only for Linux FreeBSD adds the service name by default. --- core/services/resources/classes/services.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/services/resources/classes/services.php b/core/services/resources/classes/services.php index c39dca897..a74e1eb8f 100644 --- a/core/services/resources/classes/services.php +++ b/core/services/resources/classes/services.php @@ -572,8 +572,8 @@ class services { $service_name = preg_replace('/[^a-zA-Z0-9_-]/', '', $service['name']); // Output to the console - if (PHP_SAPI === 'cli') { - echo " ".$service_name."\n"; + if (PHP_SAPI === 'cli' && stristr(PHP_OS, 'Linux')) { + echo $service_name."\n"; } // Upgrade the service @@ -642,8 +642,8 @@ class services { $service_name = preg_replace('/[^a-zA-Z0-9_-]/', '', $service['name']); // Output to the console - if (PHP_SAPI === 'cli') { - echo " ".$service_name."\n"; + if (PHP_SAPI === 'cli' && stristr(PHP_OS, 'Linux')) { + echo $service_name."\n"; } // Run the start command @@ -699,8 +699,8 @@ class services { $service_name = preg_replace('/[^a-zA-Z0-9_-]/', '', $service['name']); // Output to the console - if (PHP_SAPI === 'cli') { - echo " ".$service_name."\n"; + if (PHP_SAPI === 'cli' && stristr(PHP_OS, 'Linux')) { + echo $service_name."\n"; } // Run the restart command @@ -752,8 +752,8 @@ class services { $service_name = preg_replace('/[^a-zA-Z0-9_-]/', '', $service['name']); // Output to the console - if (PHP_SAPI === 'cli') { - echo " ".$service_name."\n"; + if (PHP_SAPI === 'cli' && stristr(PHP_OS, 'Linux')) { + echo $service_name."\n"; } // Run the stop command