From d738c7622e7d8aabdc75ef32fa4a5b739eddd6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Fri, 21 Aug 2020 16:10:38 +0200 Subject: [PATCH] adding #36 --- app/Commands/NodejsInstallCommand.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Commands/NodejsInstallCommand.php b/app/Commands/NodejsInstallCommand.php index 428ab36..c2f12a2 100644 --- a/app/Commands/NodejsInstallCommand.php +++ b/app/Commands/NodejsInstallCommand.php @@ -43,21 +43,21 @@ class NodejsInstallCommand extends Command $this->info('Nodejs installing...'); - exec('curl -sL https://deb.nodesource.com/setup_'.$version.'.x | sudo -E bash -'); - exec('apt-get install -y nodejs 2>&1'); + system('curl -sL https://deb.nodesource.com/setup_'.$version.'.x | sudo -E bash -'); // @TODO apt add a Warning for no good, in a later version output will be scanned for helpfull infos + exec('apt-get install -y nodejs 2>&1', $output); $this->line(implode("\n", Install::filterAptMessages($output))); $this->info('Nodejs add user...'); - exec('useradd -d /home/nodejs -m nodejs', $output); + system('useradd -d /home/nodejs -m nodejs'); - exec('sudo -Hu nodejs mkdir /home/nodejs/.npm'); - exec('sudo -Hu nodejs npm config set prefix /home/nodejs/.npm'); - exec('echo -e "export PATH=/home/nodejs/.npm/bin:\$PATH" >> /home/nodejs/.bashrc'); + system('sudo -Hu nodejs mkdir /home/nodejs/.npm'); + system('sudo -Hu nodejs npm config set prefix /home/nodejs/.npm'); + system('echo -e "export PATH=/home/nodejs/.npm/bin:\$PATH" >> /home/nodejs/.bashrc'); $this->info('Nodejs install npm & pm2...'); - exec('npm install -g npm && npm install -g pm2'); + system('npm install -g npm && npm install -g pm2'); // check if nginx is ready and installed if (Install::isReady('nodejs')) {