Commit 266808af3194b55836511b2da70b4629a03ce569
1 parent
841b22e395
Exists in
master
Add systemd notify on start
Showing 1 changed file with 7 additions and 3 deletions Inline Diff
index.js
1 | process.chdir(__dirname); | 1 | process.chdir(__dirname); |
2 | 2 | ||
3 | const fs = require('fs'); | 3 | const fs = require('fs'); |
4 | 4 | ||
5 | fs.writeFileSync('pid.txt', process.pid.toString()); | 5 | // eslint-disable-next-line import/order |
6 | 6 | const config = require('./config.json'); | |
7 | const config = require('komodo-sdk/config'); | ||
8 | 7 | ||
9 | global.KOMODO_LOG_LABEL = `KOMODO-CENTER@${(config && typeof config.name === 'string') ? config.name.toUpperCase() : 'EVO-CP'}`; | 8 | global.KOMODO_LOG_LABEL = `KOMODO-CENTER@${(config && typeof config.name === 'string') ? config.name.toUpperCase() : 'EVO-CP'}`; |
10 | process.title = global.KOMODO_LOG_LABEL; | 9 | process.title = global.KOMODO_LOG_LABEL; |
11 | 10 | ||
11 | // eslint-disable-next-line import/order | ||
12 | const messagingClient = require('komodo-center-messaging-client-lib'); | 12 | const messagingClient = require('komodo-center-messaging-client-lib'); |
13 | const sdNotify = require('komodo-sdk/sd-notify'); | ||
13 | const transport = require('./lib/transport'); | 14 | const transport = require('./lib/transport'); |
14 | 15 | ||
15 | messagingClient.setTransport(transport); | 16 | messagingClient.setTransport(transport); |
16 | 17 | ||
17 | require('./lib/apiserver'); | 18 | require('./lib/apiserver'); |
18 | require('./lib/webadmin'); | 19 | require('./lib/webadmin'); |
20 | |||
21 | fs.writeFileSync('pid.txt', process.pid.toString()); | ||
22 | sdNotify(); |