Commit Graph

32 Commits

Author SHA1 Message Date
Mărcziem ™
9077b4dbb9 Fix get_system_info for cross-distribution compatibility
- Remove dependency on lsb_release (not available on all distros)
- Use DISTRO_NAME variable for OS info
- Fix uptime parsing to work without -p option
2025-10-06 10:30:15 +02:00
Mărcziem ™
3c9fe4017b Fix Samba user reference to use ADMIN_USER instead of NEW_USER
- 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
2025-10-03 13:43:55 +02:00
Mărcziem ™
c0d6a07cec fix: Correct user references throughout codebase to use ADMIN_USER or current user
- 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
2025-10-03 13:24:47 +02:00
Mărcziem ™
5a0a2401ce fix: Correct services summary file path to user home directory
- 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
2025-10-03 13:10:54 +02:00
Mărcziem ™
8420a0c8b5 fix(performance): check if root_disk is valid and scheduler path exists before writing 2025-10-03 12:58:40 +02:00
Mărcziem ™
144b5c5929 fix(nfs): use # as sed delimiter to handle paths with slashes 2025-10-03 12:55:02 +02:00
Mărcziem ™
df501df118 fix(nfs): clean existing export entries before adding new ones to prevent duplicates 2025-10-03 12:52:49 +02:00
Mărcziem ™
14b35c9210 fix(nfs): avoid duplicate export entries in /etc/exports 2025-10-03 12:48:57 +02:00
Mărcziem ™
cfdace6b87 fix(netdata): use official packagecloud repository instead of broken kickstart.sh 2025-10-03 12:47:01 +02:00
Mărcziem ™
2aa614949f feat(docker): prompt user after unrecoverable docker start failures; allow abort or continue without docker 2025-10-03 12:36:22 +02:00
Mărcziem ™
a8ea1cf377 fix(docker): auto-run repair_docker.sh and retry docker start; disable docker if unrecoverable 2025-10-03 12:32:57 +02:00
Mărcziem ™
2593b6f8fe fix(docker): write valid /etc/docker/daemon.json and add optional data-root properly 2025-10-03 12:28:30 +02:00
Mărcziem ™
f106f966a3 feat(docker): interactive selection when multiple non-system users exist 2025-10-03 12:26:16 +02:00
Mărcziem ™
e545862043 feat(users): offer docker-group addition when creating admin user interactively 2025-10-03 12:25:25 +02:00
Mărcziem ™
d886652385 feat(docker): prefer ADMIN_USER/NEW_USER, auto-detect existing sudo user, create only if allowed 2025-10-03 12:24:06 +02:00
Mărcziem ™
abe0d451ab fix(docker): default DOCKER_DATA_DIR to DEFAULT_DOCKER_DATA_DIR to avoid unbound variable 2025-10-03 12:20:44 +02:00
Mărcziem ™
89349adc26 feat(users): interactive helper to create admin user if missing; call during config 2025-10-03 12:18:55 +02:00
Mărcziem ™
cfc234559e fix(docker): skip usermod when NEW_USER missing; optional user creation via CREATE_NEW_USER_IF_MISSING 2025-10-03 12:17:24 +02:00
Mărcziem ™
6eb78589b5 fix(docker): avoid unbound SUDO when not set; provide safe default 2025-10-03 12:15:15 +02:00
Mărcziem ™
b6cdf82356 fix(preflight): detect and clean apt/dpkg locks so setup can be restarted after abort 2025-10-03 12:04:17 +02:00
Mărcziem ™
4d645a31a6 fix(unattended): ensure noninteractive env under sudo and silence apt-listchanges 2025-10-03 12:01:43 +02:00
Mărcziem ™
767e607a27 fix(unattended): install non-interactively and avoid dpkg-reconfigure prompts 2025-10-03 11:59:16 +02:00
Mărcziem ™
c460f7c9e2 fix(unattended): preseed debconf and install non-interactively to avoid prompts 2025-10-03 11:54:27 +02:00
Mărcziem ™
44e0c13435 fix(ssh): robust restart helper and use it for ssh restarts 2025-10-03 11:35:53 +02:00
Mărcziem ™
834b5382d5 fix(run_installation): avoid ((current_step++)) under set -e by using explicit arithmetic increment 2025-10-03 10:39:39 +02:00
Sebastian
2926b0ab66 Refactor Vaultwarden installation script
Updated Vaultwarden installation script for NAS setup. Improved error handling, Docker checks, and ensured proper sourcing.
2025-10-03 09:58:55 +02:00
Mărcziem ™
5b3b0465c7 Fix direct function calls in lib scripts to prevent execution on source 2025-10-03 09:54:41 +02:00
Mărcziem ™
660565a1c4 fix: Remove direct execution from unattended-upgrades.sh
- Remove configure_unattended_upgrades call at end of file
- Script is now library-only, called from setup.sh where DISTRO is set
- Prevents 'DISTRO: unbound variable' error when run standalone
2025-10-03 08:53:27 +02:00
Mărcziem ™
b0340adf03 feat: Add advanced NAS performance optimizations
- Memory optimization: vm.swappiness=10, vm.vfs_cache_pressure=50
- Enhanced Docker configuration with overlay2 and log rotation
- Webmin web interface integration with firewall configuration
- Multi-distribution Webmin support (Ubuntu/Debian, Fedora, openSUSE)
- SSL configuration and session timeout optimization
- Updated documentation and installation summary
- Enterprise-grade performance tuning for NAS workloads
2025-10-03 08:10:28 +02:00
Mărcziem ™
a7fd5f806b feat: Enhance distribution detection with robust 5-method fallback system
- Add lib/detection.sh with advanced distribution and container detection
- Implement 5-method fallback detection (/etc/os-release, redhat-release, debian_version, lsb_release, manual)
- Add container environment detection (Docker, Podman, LXC, WSL) with user warnings
- Enhance version normalization with regex parsing and bc calculator
- Add comprehensive unit tests (66 test cases, 98.5% success rate)
- Update documentation (README, CHANGELOG, SECURITY, CONTRIBUTING)
- Improve enterprise-grade error handling and logging
- Add IPv6 and security considerations for 2025 compatibility
2025-10-01 23:44:48 +02:00
Sebastian Palencsár
cb91166616 feat: Major v2.0.0 rewrite - Enterprise-grade NAS setup script
🚀 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.
2025-06-17 10:57:46 +02:00
Sebastian Palencsár
5ecb235919 Add files via upload 2025-01-22 09:13:20 +01:00