|
@@ -47,7 +47,13 @@ log.info('[INFO] Starting Monitoring Deamon, pid:', process.pid);
|
|
|
process.on('SIGABRT', exitGracefully);
|
|
process.on('SIGABRT', exitGracefully);
|
|
|
process.on('SIGQUIT', exitGracefully);
|
|
process.on('SIGQUIT', exitGracefully);
|
|
|
process.on('SIGTERM', exitGracefully);
|
|
process.on('SIGTERM', exitGracefully);
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
|
|
+ if (!fs.existsSync(DATA_DIR)) {
|
|
|
|
|
+ console.info('[INFO] DATA_DIR', DATA_DIR, 'does not exist - creating now ...');
|
|
|
|
|
+ await fsp.mkdir(DATA_DIR);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
intervalHdl = setInterval(async () => {
|
|
intervalHdl = setInterval(async () => {
|
|
|
const now = moment();
|
|
const now = moment();
|
|
|
const time = now.format(TIMESTAMP_FORMAT);
|
|
const time = now.format(TIMESTAMP_FORMAT);
|