1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Merge pull request #5 from yalh76/testing

Add sudo user for npm
This commit is contained in:
yalh76 2019-01-30 19:50:22 +01:00 committed by GitHub
commit 710a1531fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 15 deletions

View file

@ -170,20 +170,20 @@ ynh_system_user_create $app $final_path
# ...
#=================================================
chown -R $app: $final_path
mkdir -p /var/log/$app
chown -R $app:$app /var/log/$app
pushd $final_path
ynh_use_nodejs
npm install hoek@^4.2.1 --save
npm install
npm audit fix
npm install typescript@>=2.0 --save
npm install ts-node
sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --save
sudo -u $app env PATH=$PATH:$nodejs_path npm install typescript@>=2.0 --save
sudo -u $app env PATH=$PATH:$nodejs_path npm install ts-node
sudo -u $app env PATH=$PATH:$nodejs_path npm install
sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix
popd
chown -R $app:$app $final_path
#=================================================
# SETUP SYSTEMD
#=================================================
@ -311,4 +311,4 @@ fi
#=================================================
systemctl reload nginx
sleep 30
sleep 30

View file

@ -130,4 +130,4 @@ ynh_restore_file "/etc/logrotate.d/$app"
#systemctl reload php5-fpm
systemctl reload nginx
sleep 30
sleep 30

View file

@ -116,13 +116,15 @@ ynh_system_user_create $app
# ...
#=================================================
chown -R $app: $final_path
pushd $final_path
ynh_use_nodejs
npm install hoek@^4.2.1 --save
npm install
npm audit fix
npm install typescript@>=2.0 --save
npm install ts-node
sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --save
sudo -u $app env PATH=$PATH:$nodejs_path npm install typescript@>=2.0 --save
sudo -u $app env PATH=$PATH:$nodejs_path npm install ts-node
sudo -u $app env PATH=$PATH:$nodejs_path npm install
sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix
popd
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
@ -176,4 +178,4 @@ fi
#=================================================
systemctl reload nginx
sleep 10
sleep 30