From d0aa341ddf43e74cf5e950cf621c1ee9f78837e0 Mon Sep 17 00:00:00 2001 From: Justin Rost Date: Fri, 28 Feb 2025 08:51:47 +0100 Subject: [PATCH] basic tools --- Init-Server.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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