Update install.sh

This commit is contained in:
Sefinek 2024-12-25 19:08:15 +01:00
parent b84737569f
commit f863f6b25b

View file

@ -109,14 +109,23 @@ case $answer in
esac
# Clone repository
cd ~ || return
if [ -d "/home" ]; then
mkdir -p /home/new_directory
echo "✅ '/home/new_directory' has been created."
else
echo "❌ '/home' directory does not exist. Exiting..."
exit 1
fi
cd /home || { echo "❌ Failed to change directory to '/home'. Exiting..."; exit 1; }
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
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 || return
git pull
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; }
fi
# Install npm dependencies