diff --git a/install.sh b/install.sh index cc0557b..093ea4c 100644 --- a/install.sh +++ b/install.sh @@ -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"