1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | var utile = require('utile'),
|
10 | common = require('./forever-monitor/common');
|
11 |
|
12 | exports.kill = common.kill;
|
13 | exports.checkProcess = common.checkProcess;
|
14 | exports.Monitor = require('./forever-monitor/monitor').Monitor;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | exports.version = require('../package').version;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | exports.start = function (script, options) {
|
28 | if (!options.uid) {
|
29 | options.uid = options.uid || utile.randomString(4).replace(/^\-/, '_');
|
30 | }
|
31 |
|
32 | return new exports.Monitor(script, options).start();
|
33 | };
|