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