Last fixes for v0.2.0

This commit is contained in:
Sefinek 2025-02-10 02:57:36 +01:00
parent d9ad94e579
commit 9556889d83
3 changed files with 9 additions and 9 deletions

View file

@ -139,14 +139,14 @@ const processLogLine = async line => {
});
});
if (process?.send) process.send('ready');
// Auto updates
if (AUTO_UPDATE_ENABLED && AUTO_UPDATE_SCHEDULE) await require('./services/updates.js')();
if (DISCORD_WEBHOOKS_ENABLED && DISCORD_WEBHOOKS_URL) await require('./services/summaries.js')();
await discordWebhooks(0, `[UFW-AbuseIPDB-Reporter](https://github.com/sefinek/UFW-AbuseIPDB-Reporter) has been successfully launched on the device \`${SERVER_ID}\`.`);
log(0, `Ready! Now monitoring: ${UFW_LOG_FILE}`);
log(0, '=====================================================================');
await discordWebhooks(0, `[UFW-AbuseIPDB-Reporter](https://github.com/sefinek/UFW-AbuseIPDB-Reporter) has been successfully launched on the device \`${SERVER_ID}\`.`);
// Auto updates
if (AUTO_UPDATE_ENABLED && AUTO_UPDATE_SCHEDULE) await require('./services/updates.js')();
if (DISCORD_WEBHOOKS_ENABLED && DISCORD_WEBHOOKS_URL) await require('./services/summaries.js')();
process.send && process.send('ready');
})();

View file

@ -68,6 +68,6 @@ const sendWebhook = async () => {
};
module.exports = async () => {
await sendWebhook();
// await sendWebhook();
new CronJob('0 0 * * *', sendWebhook, null, true, 'UTC');
};
};

View file

@ -10,7 +10,7 @@ const git = simpleGit();
const pull = async () => {
await discordWebhooks(4, 'Updating the local repository in progress `(git pull)`...');
log(0, '$ git pull');
log(0, 'Running git pull...');
try {
const { summary } = await git.pull();