From c6860491544e6c6db2cc022fc3649b6f4f54a2ab Mon Sep 17 00:00:00 2001 From: Sefinek Date: Wed, 25 Dec 2024 19:15:49 +0100 Subject: [PATCH] Update install.sh --- install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 3d34bfd..8b3458a 100644 --- a/install.sh +++ b/install.sh @@ -34,7 +34,7 @@ check_dependencies() { esac done else - echo "✅ All dependencies are installed." + echo "✅ All dependencies are installed!" fi } @@ -97,7 +97,7 @@ read -r -p "🛠️ Do you want to update and upgrade the system (apt upgrade)? case $answer in [Yy]*|[Yy]es ) echo "🔧 Updating and upgrading the system..." - apt-get update && apt-get upgrade -y + apt-get update > /dev/null 2>&1 && apt-get upgrade ;; [Nn]*|[Nn]o ) echo "⏩ Skipping system update and upgrade..." @@ -123,11 +123,13 @@ if [ ! -d "UFW-AbuseIPDB-Reporter" ]; then echo "📥 Cloning the UFW-AbuseIPDB-Reporter repository..." git clone https://github.com/sefinek/UFW-AbuseIPDB-Reporter.git --branch node.js || { echo "❌ Failed to clone the repository. Exiting..."; exit 1; } else - echo "✨ The UFW-AbuseIPDB-Reporter repository already exists! Pulling latest changes..." - cd UFW-AbuseIPDB-Reporter || { echo "❌ Failed to change directory to 'UFW-AbuseIPDB-Reporter'. Exiting..."; exit 1; } - git pull || { echo "❌ Failed to pull the latest changes. Exiting..."; exit 1; } + echo "✨ The UFW-AbuseIPDB-Reporter repository already exists!" fi +echo "📥 Pulling latest changes..." +cd UFW-AbuseIPDB-Reporter || { echo "❌ Failed to change directory to 'UFW-AbuseIPDB-Reporter'. Exiting..."; exit 1; } +git pull || { echo "❌ Failed to pull the latest changes. Exiting..."; exit 1; } + # Install npm dependencies echo "📦 Installing npm dependencies..." npm install --silent