Small fixes
This commit is contained in:
1 parent
41f43d3ff1
commit
92eef15f0a
1 file changed
+7
-8
+7
-8
@@ -120,15 +120,14 @@ if yes_no_prompt "🛠️ Do you want the script to run apt update and apt upgra
|
||||
fi
|
||||
|
||||
# Clone repository
|
||||
if [ -d "/home" ]; then
|
||||
mkdir -p /home/new_directory
|
||||
echo "📂 '/home/new_directory' has been created"
|
||||
if [ ! -d "/opt" ]; then
|
||||
mkdir -p /opt
|
||||
echo "📂 '/opt' has been created"
|
||||
else
|
||||
echo "❌ '/home' directory does not exist. Exiting..."
|
||||
exit 1
|
||||
echo "✅ '/opt' directory already exists"
|
||||
fi
|
||||
|
||||
cd /home || { echo "❌ Failed to change directory to '/home'. Exiting..."; exit 1; }
|
||||
cd /opt || { echo "❌ Failed to change directory to '/opt'. Exiting..."; exit 1; }
|
||||
|
||||
if [ ! -d "UFW-AbuseIPDB-Reporter" ]; then
|
||||
echo "📥 Cloning the UFW-AbuseIPDB-Reporter repository..."
|
||||
@@ -185,7 +184,7 @@ pm2 startup
|
||||
|
||||
# Execute the command generated by pm2 startup
|
||||
echo "🔧 Complete pm2 startup configuration:"
|
||||
sudo env PATH="$PATH":/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u "$USER" --hp /home/"$USER"
|
||||
sudo env PATH="$PATH":/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u "$USER" --hp /opt/"$USER"
|
||||
|
||||
pm2 save
|
||||
|
||||
@@ -197,8 +196,8 @@ pm2 status
|
||||
echo -e "\n🎉 Installation and configuration completed!"
|
||||
|
||||
echo -e "\n====================================== Summary ======================================"
|
||||
echo "🔑 API Token : $api_token"
|
||||
echo "🖥️ Server ID : ${server_id:-null}"
|
||||
echo "🔑 API Token : $api_token"
|
||||
echo "📂 Script : $PWD"
|
||||
echo "⚙️ Config File : $PWD/config.js"
|
||||
|
||||
|
||||
Reference in new issue
Block a user