diff --git a/Init-Server.sh b/Init-Server.sh index 14b0f85..7db7d3f 100644 --- a/Init-Server.sh +++ b/Init-Server.sh @@ -120,16 +120,20 @@ install_nodejs() { fi } -# Function to setup UFW firewall -setup_ufw() { - log_info "UFW (Uncomplicated Firewall) wird installiert und konfiguriert..." - if command_exists ufw; then - log_info "UFW ist bereits installiert." - else - apt install -y ufw +# Function to setup basic system tools and security +setup_basic_system() { + if get_user_confirmation "Basic tools und Firewall installieren?"; then + log_info "Installiere basic tools und UFW..." + apt install -y htop zip unzip ufw + + # Configure UFW ufw allow ssh echo "y" | ufw enable - log_success "UFW wurde erfolgreich installiert und konfiguriert. SSH-Verbindungen sind erlaubt." + + log_success "Basic tools und UFW wurden erfolgreich installiert." + log_success "SSH-Verbindungen sind erlaubt." + else + log_skip "Basic tools und UFW Installation übersprungen." fi } @@ -137,9 +141,9 @@ setup_ufw() { main() { setup_ssh update_system + setup_basic_system # Replace both previous functions install_docker install_nodejs - setup_ufw } # Run main function