Update install.sh
This commit is contained in:
1 parent
7e409f59d8
commit
a48c3d0834
1 file changed
+12
-10
+12
-10
@@ -18,14 +18,14 @@ cat << "EOF"
|
||||
|_|_| |_|\__\___|\__, |_| \__,_|\__|_|\___/|_| |_|
|
||||
|___/
|
||||
|
||||
This installer will configure UFW-AbuseIPDB-Reporter, a tool that analyzes UFW logs and
|
||||
reports to AbuseIPDB the IP addresses that have violated firewall rules. Join my Discord
|
||||
server to stay updated on the latest changes and more: https://discord.gg/53DBjTuzgZ
|
||||
|
||||
📩 Author : Sefinek <contact@sefinek.net> (https://sefinek.net)
|
||||
🔵 Discord : https://discord.gg/RVH8UXgmzs
|
||||
😺 GitHub Issues : https://github.com/sefinek/UFW-AbuseIPDB-Reporter/issues
|
||||
📦 Last update : 20.12.2025
|
||||
|
||||
This installer will configure UFW-AbuseIPDB-Reporter, a tool that analyzes UFW logs and
|
||||
reports to AbuseIPDB the IP addresses that have violated firewall rules. Join my Discord
|
||||
server to stay updated on the latest changes and more: https://discord.gg/53DBjTuzgZ
|
||||
============================================================================================
|
||||
|
||||
EOF
|
||||
@@ -355,7 +355,7 @@ ip_assignment=$(ask_config "> 🌐 IP assignment type (static/dynamic): " "${exi
|
||||
|
||||
# IP refresh schedule (only if dynamic)
|
||||
if [[ $ip_assignment == "dynamic" ]]; then
|
||||
echo -e "\n How often to check your public IP to prevent reporting yourself (cron format)."
|
||||
echo -e "\n How often to check your public IP to avoid accidentally reporting your own IP (cron format)."
|
||||
echo " Default '0 */6 * * *' = every 6 hours. Format: minute hour day month weekday"
|
||||
existing_ip_refresh=$(extract_config_value "IP_REFRESH_SCHEDULE")
|
||||
ip_refresh_schedule=$(ask_config "> ⏰ IP refresh schedule (cron): " "${existing_ip_refresh:-0 */6 * * *}" "cron")
|
||||
@@ -420,7 +420,7 @@ if [[ $discord_enabled == "true" ]]; then
|
||||
discord_username=$(ask_config "> 👤 Discord webhook username: " "${existing_discord_username:-SERVER_ID}" "")
|
||||
[[ -z $discord_username ]] && discord_username="SERVER_ID"
|
||||
|
||||
echo -e "\n Your Discord user ID for @mentions in critical notifications."
|
||||
echo -e "\n Your Discord user ID to receive @mentions when critical issues occur."
|
||||
echo " User Settings → Advanced → Developer Mode"
|
||||
echo " Esc → Right-click on your profile → Copy User ID. Leave blank to skip."
|
||||
discord_user_id=$(ask_config "> 🆔 Discord user ID (optional): " "$(extract_config_value "DISCORD_USER_ID")" "")
|
||||
@@ -488,7 +488,7 @@ else
|
||||
echo "❌ Failed to find the command generated by pm2 startup! PM2 was not added to autostart."
|
||||
fi
|
||||
|
||||
echo "⚙️ Running a script with PM2 and saving the current state of all processes managed by it..."
|
||||
echo "⚙️ Starting the application with PM2..."
|
||||
pm2 start --silent
|
||||
pm2 save --silent
|
||||
|
||||
@@ -498,13 +498,15 @@ pm2 status
|
||||
|
||||
echo -e "\n🎉 Installation and configuration completed! Use the 'pm2 logs' command to monitor logs in real time."
|
||||
echo -e "⚙️ More settings can be found in the file: $PWD/config.js"
|
||||
echo -e " After editing the configuration file, restart the process: pm2 restart ufw-abuseipdb"
|
||||
|
||||
echo -e "\n====================================== Summary ======================================"
|
||||
echo "🖥️ Server ID : ${server_id//\'/}"
|
||||
if [[ ${#api_token} -gt 24 ]]; then
|
||||
echo "🔑 API Key : ${api_token:0:20}...${api_token: -4}"
|
||||
else
|
||||
# Mask API token - show first 8 and last 4 chars
|
||||
if [[ ${#api_token} -gt 16 ]]; then
|
||||
echo "🔑 API Key : ${api_token:0:8}...${api_token: -4}"
|
||||
else
|
||||
echo "🔑 API Key : ${api_token:0:4}...${api_token: -4}"
|
||||
fi
|
||||
echo "📂 UFW Log File : $ufw_log_path"
|
||||
echo "💾 Cache File : $cache_file"
|
||||
|
||||
Reference in new issue
Block a user