Blame view
index.js
477 Bytes
49eaf19a3
|
1 2 3 |
'use strict'; process.chdir(__dirname); |
ce817b0cf
|
4 |
const fs = require('fs'); |
e3ee5d82b
|
5 6 |
fs.writeFileSync('pid.txt', process.pid); |
c883b5cc4
|
7 |
|
966ecafc0
|
8 |
const path = require('path'); |
158c5b010
|
9 |
const config = require('komodo-sdk/config'); |
49eaf19a3
|
10 |
|
e3ee5d82b
|
11 12 13 |
if (!fs.existsSync(config.modem.device)) { process.exit(4); } |
966ecafc0
|
14 |
|
e3bb6fdba
|
15 |
process.title = (typeof config.name === 'string') ? config.name.toUpperCase() : `MODEM-${path.basename(config.modem.device).replace('tty', '').toUpperCase()}`; |
56758af44
|
16 |
require('./lib/http-command-server'); |
49eaf19a3
|
17 |
require('./lib/modem'); |