* If start start/restart application
(cb)
| 666 | * If start <app_name> start/restart application |
| 667 | */ |
| 668 | function restartExistingProcessName(cb) { |
| 669 | if (!isNaN(script) || |
| 670 | (typeof script === 'string' && script.indexOf('/') != -1) || |
| 671 | (typeof script === 'string' && path.extname(script) !== '')) |
| 672 | return cb(null); |
| 673 | |
| 674 | if (script !== 'all') { |
| 675 | that.Client.getProcessIdByName(script, function(err, ids) { |
| 676 | if (err && cb) return cb(err); |
| 677 | if (ids.length > 0) { |
| 678 | that._operate('restartProcessId', script, opts, function(err, list) { |
| 679 | if (err) return cb(err); |
| 680 | Common.printOut(conf.PREFIX_MSG + 'Process successfully started'); |
| 681 | return cb(true, list); |
| 682 | }); |
| 683 | } |
| 684 | else return cb(null); |
| 685 | }); |
| 686 | } |
| 687 | else { |
| 688 | that._operate('restartProcessId', 'all', function(err, list) { |
| 689 | if (err) return cb(err); |
| 690 | Common.printOut(conf.PREFIX_MSG + 'Process successfully started'); |
| 691 | return cb(true, list); |
| 692 | }); |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | function restartExistingProcessId(cb) { |
| 697 | if (isNaN(script)) return cb(null); |
nothing calls this directly
no test coverage detected
searching dependent graphs…