- Added DISTRO_NAME variable to detect_distro function using PRETTY_NAME from /etc/os-release
- Export DISTRO_NAME for use in show_installation_summary function
- Prevent 'unbound variable' error when creating services summary file
- Corrected setup_samba function to use ${ADMIN_USER:-$USER} consistently
- Export configuration variables in load_or_create_config for subshell access
- Ensure ADMIN_USER variable is properly available in all lib scripts
- Replace all NEW_USER references with ADMIN_USER or current user
- Fix Samba password prompt to use correct user instead of 'nasadmin'
- Update SSH, Docker, and Samba configurations to use proper user variables
- Ensure consistent user handling across all services
- Remove hardcoded 'nasadmin' references
- Modify setup.sh to automatically detect and use SUDO_USER
- Pre-fill admin username with current sudo user
- Only create new user if specified user doesn't exist
- Update README.md to document user management changes
- Update CHANGELOG.md with user management improvements
- Remove unnecessary NEW_USER default creation
- Change summary file location from /root/nas_services.txt to ~/nas_services.txt
- Use SUDO_USER environment variable to determine correct user home directory
- Update README.md to reflect the correct path for the services summary file
- Ensure file is created in the home directory of the user who ran sudo
- Update version to v2.1.1 in README.md
- Add new features section for v2.1.1 including Docker auto-repair, NFS fixes, Netdata updates
- Update CHANGELOG.md with detailed fixes and improvements
- Update service descriptions to reflect optional nature of services
- Add Docker repair script to directory structure and troubleshooting
- Document new auto-repair functionality and optional unattended-upgrades
- Change load_or_create_config to call create_interactive_config when validate_config fails
- This ensures inconsistent configs are replaced with valid ones
🚀 BREAKING CHANGE: Complete rewrite to enterprise-grade standards
### ✨ New Features:
- Enhanced input validation (IP, port, username, path)
- Automatic rollback mechanism on failures
- Comprehensive unit testing framework (50+ tests)
- Advanced logging with timestamps and levels
- Interactive configuration system with persistence
- Performance optimization suite (kernel, Docker, Samba)
- Advanced firewall configuration with monitoring
- System health monitoring and maintenance tools
- Multi-distribution support with version validation
### 🛡️ Security Enhancements:
- SSH hardening with security policies
- Rate limiting for critical services
- IP blocking/unblocking tools
- Intrusion detection capabilities
- Firewall monitoring with alerts
- Secure input sanitization
### 🔧 Architecture Improvements:
- Modular library structure
- Centralized configuration management
- Common functions separation
- Professional error handling with set -euo pipefail
- Signal handling for graceful shutdowns
- Resource cleanup mechanisms
### 📚 Documentation:
- Professional README with comprehensive guides
- Enhanced CONTRIBUTING.md with development standards
- Complete CHANGELOG.md with version history
- Troubleshooting guides and best practices
### 🧪 Testing & Quality:
- Unit tests for all critical functions
- Performance regression testing
- Multi-distribution integration testing
- Input validation testing
- Error scenario testing
This release transforms the script from a basic tool to a production-ready,
enterprise-grade NAS setup solution suitable for professional environments.