Skip to content

Commit

Permalink
reword the startup command helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Sep 14, 2017
1 parent 4f8b8d6 commit 43b6000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/API/Startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ module.exports = function(CLI) {
*/
function isNotRoot(platform, opts, cb) {
if (opts.user) {
Common.printOut(cst.PREFIX_MSG + 'You have to run this command as root. Execute the following command:');
Common.printOut(cst.PREFIX_MSG + 'To setup the Startup Script, copy/paste the following command:');
console.log('sudo env PATH=$PATH:' + path.dirname(process.execPath) + ' pm2 ' + opts.args[1].name() + ' ' + platform + ' -u ' + opts.user + ' --hp ' + process.env.HOME);
return cb(new Error('You have to run this with elevated rights'));
}
return exec('whoami', function(err, stdout, stderr) {
Common.printOut(cst.PREFIX_MSG + 'You have to run this command as root. Execute the following command:');
Common.printOut(cst.PREFIX_MSG + 'To setup the Startup Script, copy/paste the following command:');
console.log('sudo env PATH=$PATH:' + path.dirname(process.execPath) + ' ' + require.main.filename + ' ' + opts.args[1].name() + ' ' + platform + ' -u ' + stdout.trim() + ' --hp ' + process.env.HOME);
return cb(new Error('You have to run this with elevated rights'));
});
Expand Down

0 comments on commit 43b6000

Please sign in to comment.