Skip to content

Commit 845aa68

Browse files
committed
chore: clarify upgrade messages - INFO not WARNING for auto-restore; venv/WSGI wording
1 parent 408a27e commit 845aa68

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cyberpanel_upgrade.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,14 +804,14 @@ CYBERCP_ESSENTIAL_DIRS=(
804804
CYBERCP_MISSING=0
805805
for dir in "${CYBERCP_ESSENTIAL_DIRS[@]}"; do
806806
if [ ! -d "$dir" ]; then
807-
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] WARNING: Essential directory missing: $dir" | tee -a /var/log/cyberpanel_upgrade_debug.log
807+
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] INFO: Essential directory missing (will restore): $dir" | tee -a /var/log/cyberpanel_upgrade_debug.log
808808
CYBERCP_MISSING=1
809809
fi
810810
done
811811

812-
# If essential directories are missing, perform recovery
812+
# If essential directories are missing, perform automatic recovery (normal on some upgrade paths)
813813
if [ $CYBERCP_MISSING -eq 1 ]; then
814-
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] INFO: Some CyberCP directories are missing. Performing automatic recovery..." | tee -a /var/log/cyberpanel_upgrade_debug.log
814+
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] INFO: Restoring missing CyberCP directories from repository..." | tee -a /var/log/cyberpanel_upgrade_debug.log
815815

816816
# Backup any remaining configuration files if they exist
817817
if [ -f "/usr/local/CyberCP/CyberCP/settings.py" ]; then
@@ -853,7 +853,7 @@ if [ $CYBERCP_MISSING -eq 1 ]; then
853853
# Clean up temporary clone
854854
rm -rf /usr/local/CyberCP_recovery_tmp
855855

856-
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] Recovery completed successfully. CyberCP structure restored." | tee -a /var/log/cyberpanel_upgrade_debug.log
856+
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] Recovery completed. All essential CyberCP directories restored." | tee -a /var/log/cyberpanel_upgrade_debug.log
857857
else
858858
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] ERROR: Failed to clone repository for recovery" | tee -a /var/log/cyberpanel_upgrade_debug.log
859859
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] Please run full installation instead of upgrade" | tee -a /var/log/cyberpanel_upgrade_debug.log
@@ -925,7 +925,7 @@ elif [[ -d /usr/local/CyberPanel/bin/ ]]; then
925925
else
926926
#!/bin/bash
927927

928-
echo -e "\nNothing found, need fresh setup...\n"
928+
echo -e "\nNo existing virtualenv found; creating fresh Python environment...\n"
929929

930930
# Attempt to create a virtual environment
931931
if [[ "$Server_OS" = "Ubuntu" ]] && ([[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]]); then
@@ -1369,6 +1369,7 @@ if [[ -f Makefile ]]; then
13691369
fi
13701370

13711371
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] Compiling WSGI with optimized flags..." | tee -a /var/log/cyberpanel_upgrade_debug.log
1372+
echo -e "[$(date +"%Y-%m-%d %H:%M:%S")] (Upstream WSGI source may show harmless strncpy/gstate warnings; build can still succeed.)" | tee -a /var/log/cyberpanel_upgrade_debug.log
13721373
make clean 2>&1 | tee -a /var/log/cyberpanel_upgrade_debug.log
13731374
make 2>&1 | tee -a /var/log/cyberpanel_upgrade_debug.log
13741375

0 commit comments

Comments
 (0)