Commit e3bb6fdbabcddd9992f881e7a4ebe3092cf1dd9a
1 parent
17b3eccb61
Exists in
master
Urutan pada index.js
Showing 1 changed file with 2 additions and 2 deletions Inline Diff
index.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | process.chdir(__dirname); | 3 | process.chdir(__dirname); |
4 | const fs = require('fs'); | 4 | const fs = require('fs'); |
5 | 5 | ||
6 | fs.writeFileSync('pid.txt', process.pid); | 6 | fs.writeFileSync('pid.txt', process.pid); |
7 | 7 | ||
8 | const path = require('path'); | 8 | const path = require('path'); |
9 | const config = require('komodo-sdk/config'); | 9 | const config = require('komodo-sdk/config'); |
10 | 10 | ||
11 | process.title = (typeof config.name === 'string') ? config.name.toUpperCase() : `MODEM-${path.basename(config.modem.device).replace('tty', '').toUpperCase()}`; | ||
12 | |||
13 | if (!fs.existsSync(config.modem.device)) { | 11 | if (!fs.existsSync(config.modem.device)) { |
14 | process.exit(4); | 12 | process.exit(4); |
15 | } | 13 | } |
16 | 14 | ||
15 | process.title = (typeof config.name === 'string') ? config.name.toUpperCase() : `MODEM-${path.basename(config.modem.device).replace('tty', '').toUpperCase()}`; | ||
16 | |||
17 | require('./lib/http-command-server'); | 17 | require('./lib/http-command-server'); |