Fixes again
This commit is contained in:
parent
f0e797b6c4
commit
a292dd5bdf
2 changed files with 6 additions and 4 deletions
8
index.js
8
index.js
|
|
@ -117,13 +117,15 @@ const processLogLine = async (line, test = false) => {
|
|||
};
|
||||
|
||||
(async () => {
|
||||
log(0, `v${version} (https://github.com/sefinek/UFW-AbuseIPDB-Reporter)`);
|
||||
log(0, `Version ${version} - https://github.com/sefinek/UFW-AbuseIPDB-Reporter`);
|
||||
|
||||
loadReportedIPs();
|
||||
|
||||
log(0, 'Fetching your IP addresses...');
|
||||
await refreshServerIPs();
|
||||
|
||||
if (!fs.existsSync(UFW_LOG_FILE)) {
|
||||
log(2, `Log file ${UFW_LOG_FILE} does not exist.`);
|
||||
log(2, `Log file ${UFW_LOG_FILE} does not exist`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +136,7 @@ const processLogLine = async (line, test = false) => {
|
|||
const stats = fs.statSync(path);
|
||||
if (stats.size < fileOffset) {
|
||||
fileOffset = 0;
|
||||
log(1, 'The file has been truncated, and the offset has been reset.');
|
||||
log(1, 'The file has been truncated, and the offset has been reset');
|
||||
}
|
||||
|
||||
fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }).on('data', chunk => {
|
||||
|
|
|
|||
2
scripts
2
scripts
|
|
@ -1 +1 @@
|
|||
Subproject commit c550075d2dd7b115bc2ee9f19fdf89e23eec997f
|
||||
Subproject commit 150fb53fbdd0ff6429c298f7d697488854328a5f
|
||||
Loading…
Add table
Reference in a new issue