From 2441155399f889e3121205c0a34f27e0d02c527c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=83rcziem=20=E2=84=A2?= <118485377+spalencsar@users.noreply.github.com> Date: Fri, 3 Oct 2025 09:00:11 +0200 Subject: [PATCH] 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 --- README.md | 8 ++++---- setup.sh | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d79d3b7..cd24567 100644 --- a/README.md +++ b/README.md @@ -125,12 +125,12 @@ The script guides you through an interactive configuration: - **Gateway and DNS:** IPv4/IPv6 automatic detection with override capability ### Service Selection -- **Docker:** Container platform with Compose plugin +- **Docker:** Container platform with Compose plugin (required for Vaultwarden, Jellyfin, Portainer) - **NFS:** Network File System with IPv6 support - **Netdata:** System monitoring -- **Vaultwarden:** Password manager with security hardening -- **Jellyfin:** Media server with modern GPG keys -- **Portainer:** Docker management with HTTPS +- **Vaultwarden:** Password manager with security hardening (requires Docker) +- **Jellyfin:** Media server with modern GPG keys (requires Docker) +- **Portainer:** Docker management with HTTPS (requires Docker) - **Webmin:** Web-based system administration interface ### Security Configuration diff --git a/setup.sh b/setup.sh index efd2d86..bf6f940 100644 --- a/setup.sh +++ b/setup.sh @@ -304,9 +304,19 @@ create_interactive_config() { save_config "INSTALL_DOCKER" "$(ask_yes_no "Install Docker?" "y" && echo "true" || echo "false")" save_config "INSTALL_NFS" "$(ask_yes_no "Install NFS?" "n" && echo "true" || echo "false")" save_config "INSTALL_NETDATA" "$(ask_yes_no "Install Netdata monitoring?" "y" && echo "true" || echo "false")" - save_config "INSTALL_VAULTWARDEN" "$(ask_yes_no "Install Vaultwarden password manager?" "n" && echo "true" || echo "false")" - save_config "INSTALL_JELLYFIN" "$(ask_yes_no "Install Jellyfin media server?" "n" && echo "true" || echo "false")" - save_config "INSTALL_PORTAINER" "$(ask_yes_no "Install Portainer Docker management?" "n" && echo "true" || echo "false")" + + # Docker-dependent services + if [[ "${INSTALL_DOCKER:-false}" == "true" ]]; then + save_config "INSTALL_VAULTWARDEN" "$(ask_yes_no "Install Vaultwarden password manager?" "n" && echo "true" || echo "false")" + save_config "INSTALL_JELLYFIN" "$(ask_yes_no "Install Jellyfin media server?" "n" && echo "true" || echo "false")" + save_config "INSTALL_PORTAINER" "$(ask_yes_no "Install Portainer Docker management?" "n" && echo "true" || echo "false")" + else + log_warning "Docker not selected - skipping Docker-dependent services (Vaultwarden, Jellyfin, Portainer)" + save_config "INSTALL_VAULTWARDEN" "false" + save_config "INSTALL_JELLYFIN" "false" + save_config "INSTALL_PORTAINER" "false" + fi + save_config "INSTALL_WEBMIN" "$(ask_yes_no "Install Webmin web interface?" "n" && echo "true" || echo "false")" log_success "Configuration created and saved to ${CONFIG_FILE}"