diff --git a/default.config.js b/default.config.js index 3ac4972..60e3a53 100644 --- a/default.config.js +++ b/default.config.js @@ -3,7 +3,7 @@ exports.MAIN = { UFW_LOG_FILE: '/var/log/ufw.log', CACHE_FILE: '/tmp/ufw-abuseipdb-reporter.cache', SERVER_ID: null, // The server name that will be visible in the reports (e.g., 'homeserver1'). If you don't want to define it, leave the value as null. - REFRESHING_IP_ADDRESS: 5 * 60 * 1000, // How often should (every 5 minutes) the script check the server's IP address to avoid accidental self-reports? + IP_REFRESH_INTERVAL: 5 * 60 * 1000, // How often should (every 5 minutes) the script check the server's IP address to avoid accidental self-reports? // Reporting ABUSEIPDB_API_KEY: '', // Secret API key for AbuseIPDB. diff --git a/services/fetchServerIP.js b/services/fetchServerIP.js index af23c45..3503230 100644 --- a/services/fetchServerIP.js +++ b/services/fetchServerIP.js @@ -1,7 +1,7 @@ const { networkInterfaces } = require('node:os'); const axios = require('./axios.js'); const isLocalIP = require('../utils/isLocalIP.js'); -const { REFRESHING_IP_ADDRESS } = require('../config.js').MAIN; +const { IP_REFRESH_INTERVAL } = require('../config.js').MAIN; const ipAddrList = new Set(); @@ -32,7 +32,7 @@ const fetchServerIPs = async () => { (async () => { await fetchServerIPs(); - setInterval(fetchServerIPs, REFRESHING_IP_ADDRESS); + setInterval(fetchServerIPs, IP_REFRESH_INTERVAL); // console.debug(ipAddrList); })();