diff --git a/NodeJS.sh b/NodeJS.sh index cb87dd2..358c395 100755 --- a/NodeJS.sh +++ b/NodeJS.sh @@ -36,8 +36,7 @@ if [ -d "$nvmDir" ]; then if [ ! -d "/opt/nvm/versions/node/$nodeVersion" ]; then echo "Install this version" nvm install $nodeVersion - - chmod -R 777 /opt/nvm + chmod -R 755 /opt/nvm else echo "Error on install Node version on NVM" fi @@ -90,7 +89,7 @@ sleep 5 if [ ! -f "$nodeDir/app.sock" ]; then echo "Allow nginx access to the socket $nodeDir/app.sock" - chmod 777 "$nodeDir/app.sock" + chmod 755 "$nodeDir/app.sock" else echo "Sock file not present disable Node app" runuser -l $user -c "pm2 del $scriptName" diff --git a/README.md b/README.md index e82c064..6866ffa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # HestiaCP with Node.JS support. With this repo you can run multiples NodeJS Apps at same time. -This template read `.env` file, `.nvm` for Node version, and `package.json` for get info and auto install modules. +This template reads the `.env` file, `.nvm` for Node version, and `package.json` to get info and automatically install modules. ![HestiaCP](https://logico.com.ar/img/2019/04/21/vestacp_proxy_setup.png) @@ -11,7 +11,7 @@ https://logico.ar/blog/2019/04/20/soporte-para-aplicaciones-nodejs-en-vestacp ## Installation ***Auto "With Script":*** -* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `./install.sh`. Script auto install `NVM` and `PM2` +* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `sudo ./install.sh`. Script auto install `NVM` and `PM2` ***Manually:*** * Install PM2 `npm i pm2@latest -g` diff --git a/install.sh b/install.sh index c710ee8..f3e0b4d 100644 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ if [ ! -f ~/.nvm/nvm.sh ]; then mv ~/.nvm /opt/nvm - chmod -R 777 /opt/nvm + chmod -R 755 /opt/nvm echo "-> Add this lines to the end your ~/.bashrc file" echo 'export NVM_DIR="/opt/nvm"