Improve launcher initialization - silent detection after first run
Problem: System detection printed 6 [INFO] messages every time launcher started, making it feel slow and repetitive. Solution: Only show detection messages on first run when SYS_DETECTION_COMPLETE is not set. Subsequent runs are silent while still performing detection. Changes: - lib/system-detect.sh: Added silent detection check to all detect_* functions Lines 40, 99, 137, 186, 213, 278: [ -n "$SYS_DETECTION_COMPLETE" ] || print_info - REFDB_FORMAT.txt: Added documentation preferences section Result: Clean, fast launcher after first initialization
This commit is contained in:
@@ -36,7 +36,8 @@ export SYS_FIREWALL_ACTIVE=""
|
||||
#############################################################################
|
||||
|
||||
detect_control_panel() {
|
||||
print_info "Detecting control panel..."
|
||||
# Silent detection if already detected
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting control panel..."
|
||||
|
||||
# cPanel
|
||||
if [ -f "/usr/local/cpanel/version" ]; then
|
||||
@@ -95,7 +96,7 @@ detect_control_panel() {
|
||||
#############################################################################
|
||||
|
||||
detect_os() {
|
||||
print_info "Detecting operating system..."
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting operating system..."
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
source /etc/os-release
|
||||
@@ -133,7 +134,7 @@ detect_os() {
|
||||
#############################################################################
|
||||
|
||||
detect_web_server() {
|
||||
print_info "Detecting web server..."
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting web server..."
|
||||
|
||||
# Apache
|
||||
if command_exists httpd; then
|
||||
@@ -182,7 +183,7 @@ detect_web_server() {
|
||||
#############################################################################
|
||||
|
||||
detect_database() {
|
||||
print_info "Detecting database server..."
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting database server..."
|
||||
|
||||
if command_exists mysql; then
|
||||
local version_output=$(mysql --version 2>/dev/null)
|
||||
@@ -209,7 +210,7 @@ detect_database() {
|
||||
#############################################################################
|
||||
|
||||
detect_php_versions() {
|
||||
print_info "Detecting PHP versions..."
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting PHP versions..."
|
||||
|
||||
SYS_PHP_VERSIONS=()
|
||||
|
||||
@@ -274,7 +275,7 @@ detect_cloudflare() {
|
||||
#############################################################################
|
||||
|
||||
detect_firewall() {
|
||||
print_info "Detecting firewall..."
|
||||
[ -n "$SYS_DETECTION_COMPLETE" ] || print_info "Detecting firewall..."
|
||||
|
||||
# CSF/LFD
|
||||
if [ -f "/etc/csf/csf.conf" ]; then
|
||||
|
||||
Reference in New Issue
Block a user