* If start start/restart application
(cb)
| 753 | * If start <app_name> start/restart application |
| 754 | */ |
| 755 | function restartExistingProcessName(cb) { |
| 756 | if (!isNaN(script) || |
| 757 | (typeof script === 'string' && script.indexOf('/') != -1) || |
| 758 | (typeof script === 'string' && path.extname(script) !== '')) |
| 759 | return cb(null); |
| 760 | |
| 761 | that.Client.getProcessIdByName(script, function(err, ids) { |
| 762 | if (err && cb) return cb(err); |
| 763 | if (ids.length > 0) { |
| 764 | that._operate('restartProcessId', script, opts, function(err, list) { |
| 765 | if (err) return cb(err); |
| 766 | Common.printOut(conf.PREFIX_MSG + 'Process successfully started'); |
| 767 | return cb(true, list); |
| 768 | }); |
| 769 | } |
| 770 | else return cb(null); |
| 771 | }); |
| 772 | } |
| 773 | |
| 774 | /** |
| 775 | * If start <namespace> start/restart namespace |
nothing calls this directly
no test coverage detected