Skip to content

Commit 7dfe000

Browse files
authored
Updates
1 parent ca03479 commit 7dfe000

4 files changed

Lines changed: 156 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,38 @@ Changes are organized by date, with the most recent changes listed first.
66

77
## 2025-08-29
88

9-
### 🔧 UBUNTU PRO INSTALLATION SYSTEM REFACTORING
9+
### � INSTALLATION COMPLETION VERIFICATION SYSTEM
10+
11+
- **Comprehensive Installation Validation**: Implemented robust system to verify EngineScript installation completion
12+
- **Common Functions Library**: Added `check_installation_completion()` and `verify_installation_completion()` to shared functions
13+
- **24-Component Verification**: Validates all required installation components (REPOS, DEPENDS, MARIADB, PHP, NGINX, etc.)
14+
- **Update Script Protection**: Prevents updates from running on incomplete installations with clear error messaging
15+
- **Install Script Verification**: Added final verification step to installation process before reboot
16+
- **Flexible Operation Modes**: Supports both verbose and quiet modes for different use cases
17+
- **Error Diagnostics Integration**: References existing debug tools and error logs for troubleshooting
18+
- **Professional User Feedback**: Provides clear success/failure messages with actionable resolution steps
19+
- **DRY Code Implementation**: Single function definition used across multiple scripts for consistency
20+
21+
### 🚀 SOFTWARE VERSION MANAGEMENT IMPROVEMENTS
22+
23+
- **Nginx Version Detection**: Updated from version 1.29.0 to 1.29.1 across all configuration files
24+
- **GitHub API Integration**: Enhanced software version checker to use GitHub API for nginx release detection
25+
- **Reliability Improvements**: Replaced HTML parsing with official API calls for consistent version detection
26+
- **Error Handling**: Added robust fallback mechanisms for version detection failures
27+
28+
- **OpenSSL Version Consistency**: Standardized OpenSSL version detection to 3.5.x branch across entire codebase
29+
- **Unified Version Checking**: Updated GitHub Actions workflow to use consistent OpenSSL 3.5.x pattern
30+
- **CI Configuration Sync**: Synchronized version patterns between main workflow and CI configuration files
31+
- **Branch Compatibility**: Ensured version detection works reliably across all OpenSSL 3.5.x releases
32+
33+
### 🔧 GITHUB ACTIONS WORKFLOW ENHANCEMENTS
34+
35+
- **Branch Event Triggers**: Added `create` event trigger to enginescript-build-test workflow
36+
- **Automatic Testing**: Now runs build tests when new branches are created
37+
- **Development Support**: Enhances developer workflow by providing immediate feedback on branch creation
38+
- **CI/CD Integration**: Ensures code quality checks run consistently across all development branches
39+
40+
### �🔧 UBUNTU PRO INSTALLATION SYSTEM REFACTORING
1041

1142
- **Modular Installation Structure**: Refactored Ubuntu Pro setup to follow EngineScript's standardized component pattern
1243
- **New Install Script**: Created dedicated `ubuntu-pro-install.sh` script in `/scripts/install/ubuntu-pro/` directory

scripts/functions/shared/enginescript-common.sh

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,83 @@ function set_php_permissions() {
300300
chown -R www-data:www-data /var/log/php
301301
chown -R www-data:www-data /etc/php
302302
}
303+
304+
# Check if all required EngineScript installation components are completed
305+
# Returns 0 if all components are installed, exits with error if incomplete
306+
function check_installation_completion() {
307+
local install_log="/var/log/EngineScript/install-log.txt"
308+
local missing_components=()
309+
local quiet_mode="${1:-false}" # Optional parameter for quiet mode
310+
311+
# Source the install log if it exists
312+
if [[ -f "$install_log" ]]; then
313+
source "$install_log" 2>/dev/null || true
314+
else
315+
if [[ "$quiet_mode" != "true" ]]; then
316+
echo "ERROR: Installation log not found at $install_log"
317+
echo "This indicates EngineScript installation was never started or completed."
318+
echo "Please run the full installation script first."
319+
fi
320+
return 1
321+
fi
322+
323+
# Define all required installation components
324+
local required_components=(
325+
"REPOS" "REMOVES" "BLOCK" "UBUNTU_PRO" "DEPENDS" "CRON" "ACME"
326+
"GCC" "OPENSSL" "SWAP" "KERNEL_TWEAKS" "KSM" "SFL" "NTP"
327+
"PCRE" "ZLIB" "LIBURING" "UFW" "MARIADB" "PHP" "REDIS" "NGINX" "TOOLS"
328+
)
329+
330+
# Check each required component
331+
for component in "${required_components[@]}"; do
332+
local var_name="$component"
333+
local var_value="${!var_name:-0}"
334+
335+
if [[ "$var_value" != "1" ]]; then
336+
missing_components+=("$component")
337+
fi
338+
done
339+
340+
# Return results based on mode
341+
if [[ ${#missing_components[@]} -eq 0 ]]; then
342+
if [[ "$quiet_mode" != "true" ]]; then
343+
echo "✅ SUCCESS: All EngineScript components are installed and completed."
344+
fi
345+
return 0
346+
else
347+
if [[ "$quiet_mode" != "true" ]]; then
348+
echo "❌ ERROR: EngineScript installation is incomplete."
349+
echo "❌ The following components are missing or failed to complete:"
350+
echo ""
351+
for component in "${missing_components[@]}"; do
352+
echo " - $component"
353+
done
354+
echo ""
355+
echo "RESOLUTION:"
356+
echo "1. Run the full EngineScript installation script to complete setup"
357+
echo "2. Check /var/log/EngineScript/install-error-log.txt for specific errors"
358+
echo "3. Use 'es.debug' command to generate a complete diagnostic report"
359+
echo ""
360+
fi
361+
return 1
362+
fi
363+
}
364+
365+
# Verify installation completion with error handling for scripts that require it
366+
function verify_installation_completion() {
367+
local script_name="${1:-Unknown script}"
368+
369+
echo "============================================================="
370+
echo "Verifying EngineScript Installation Completion..."
371+
echo "============================================================="
372+
373+
if check_installation_completion; then
374+
echo "✅ Installation verification passed. Proceeding with $script_name..."
375+
echo ""
376+
return 0
377+
else
378+
echo ""
379+
echo "$script_name cannot proceed until all components are properly installed."
380+
exit 1
381+
fi
382+
}

scripts/install/enginescript-install.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,40 @@ fi
473473
print_last_errors
474474
debug_pause "Tools"
475475

476+
# --------------------------------------------------------
477+
# Final Installation Completion Verification
478+
echo ""
479+
echo "============================================================="
480+
echo "Final Installation Verification"
481+
echo "============================================================="
482+
echo ""
483+
484+
# Verify all components completed successfully
485+
if check_installation_completion "true"; then
486+
echo "🎉 SUCCESS: EngineScript installation completed successfully!"
487+
echo "🎉 All 24 core components have been installed and verified."
488+
echo ""
489+
echo "Installation Summary:"
490+
echo "✅ System repositories and dependencies"
491+
echo "✅ Security and firewall configuration"
492+
echo "✅ Core services (MariaDB, PHP, Redis, Nginx)"
493+
echo "✅ SSL/TLS and build environment"
494+
echo "✅ System optimization and tools"
495+
echo ""
496+
else
497+
echo "⚠️ WARNING: Installation verification detected some incomplete components."
498+
echo "⚠️ This may indicate errors during installation that need attention."
499+
echo ""
500+
echo "RECOMMENDATION:"
501+
echo "1. Review /var/log/EngineScript/install-error-log.txt for any errors"
502+
echo "2. Use 'es.debug' command after reboot to generate a diagnostic report"
503+
echo "3. Consider re-running the installation script to complete missing components"
504+
echo ""
505+
fi
506+
507+
echo "============================================================="
508+
echo ""
509+
476510
# Cleanup
477511
/usr/local/bin/enginescript/scripts/functions/php-clean.sh
478512
/usr/local/bin/enginescript/scripts/functions/enginescript-cleanup.sh

scripts/update/enginescript-update.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ echo ""
6464
echo ""
6565

6666

67+
# --------------------------------------------------------
68+
# Check Installation Completion Status
69+
verify_installation_completion "EngineScript Update"
70+
71+
echo "============================================================="
72+
echo "Installation Verification Complete - Proceeding with Updates"
73+
echo "============================================================="
74+
echo ""
75+
76+
6777
# --------------------------------------------------------
6878
# Updating files from previous versions
6979
/usr/local/bin/enginescript/scripts/functions/auto-upgrade/normal-auto-upgrade.sh

0 commit comments

Comments
 (0)