Update install.sh
This commit is contained in:
parent
b84737569f
commit
f863f6b25b
1 changed files with 13 additions and 4 deletions
17
install.sh
17
install.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue