Commit Graph

58 Commits

Author SHA1 Message Date
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 ™
21781166ea feat: Use existing sudo user instead of creating new nasadmin user
- 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
2025-10-03 13:15:51 +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 ™
0253b226a4 docs: Update README.md and CHANGELOG.md for v2.1.1
- 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
2025-10-03 13:06:52 +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 ™
0b25a86f91 chore(scripts): add repair_docker.sh to validate and recover docker daemon.json and restart docker 2025-10-03 12:30:19 +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 ™
7a2d1f1c8e chore(unattended): make automatic updates optional and opt-in via config 2025-10-03 12:11:57 +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 ™
59a46b3754 fix(handle_error): support wrapper-call usage and trap handler 2025-10-03 11:43:47 +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 ™
1a67acaafc fix(defaults): restore SCRIPT_AUTHOR and validate_config; remove debug-force 2025-10-03 11:31:08 +02:00
Mărcziem ™
0fd250a5b3 Revert temporary debugging changes now that lib scripts are fixed 2025-10-03 10:39:40 +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
Mărcziem ™
3e048ba938 fix(run_installation): avoid ((current_step++)) under set -e by using explicit arithmetic increment 2025-10-03 10:38:30 +02:00
Mărcziem ™
3fb7f3479e Add debug trace logs to run_installation to locate stall/abort point 2025-10-03 10:25:59 +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 ™
5416687af2 Remove existing config file before creating new one to prevent loading old config 2025-10-03 09:31:38 +02:00
Mărcziem ™
34f45f978c Unset config variables before loading config to prevent environment pollution 2025-10-03 09:30:01 +02:00
Mărcziem ™
1c2dbe22a1 Force interactive configuration always for debugging config persistence issues 2025-10-03 09:27:03 +02:00
Mărcziem ™
494b13264e Force new configuration for debugging to resolve config persistence issues 2025-10-03 09:19:55 +02:00
Mărcziem ™
f3afd46abc Fix config loading after creation
- Load config after create_interactive_config to set variables in shell
- Ensures INSTALL_* variables are properly set for installation logic
2025-10-03 09:14:03 +02:00
Mărcziem ™
8db3151495 Fix config validation to recreate config on failure
- Change load_or_create_config to call create_interactive_config when validate_config fails
- This ensures inconsistent configs are replaced with valid ones
2025-10-03 09:10:48 +02:00
Mărcziem ™
0358f45d60 Add Docker dependency validation to validate_config
- Check if Docker-dependent services are enabled without Docker
- Force interactive config recreation if inconsistencies found
2025-10-03 09:09:44 +02:00
Mărcziem ™
fea22c3e0d Fix Docker dependency check in interactive config
- Use local variable for Docker selection to properly check dependencies
- Ensure Docker-dependent services are only prompted when Docker is selected
2025-10-03 09:02:13 +02:00
Mărcziem ™
2441155399 fix: Prevent Docker-dependent services when Docker not selected
- Add dependency check in create_interactive_config
- Docker services (Vaultwarden, Jellyfin, Portainer) only offered when Docker selected
- Update README to clarify Docker requirements
- Prevents 'Docker not installed' errors during installation
2025-10-03 09:00:11 +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 ™
081e32ed43 fix: Update version in setup.sh header to 2.1.1 2025-10-01 23:48:19 +02:00
Mărcziem ™
7a1384d48f docs: Update CHANGELOG for v2.1.1 distribution detection release 2025-10-01 23:46:23 +02:00
Mărcziem ™
086c101923 chore: Update version to 2.1.1 for enhanced distribution detection release 2025-10-01 23:46:09 +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
v2.1.1
2025-10-01 23:44:48 +02:00