mirror of
https://github.com/YunoHost-Apps/nodered_ynh.git
synced 2024-09-03 19:46:25 +02:00
[fix] install, restore, upgrade
- npm does not install globally anymore - restore and upgrade make sure that nodejs in installed
This commit is contained in:
parent
1cad6a12e4
commit
b15e6f0afe
3 changed files with 14 additions and 3 deletions
|
@ -79,7 +79,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
# Use Helper instead of package from the repo
|
# Use Helper instead of package from the repo
|
||||||
|
|
||||||
ynh_install_nodejs 10
|
ynh_install_nodejs $nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -101,7 +101,7 @@ ynh_script_progression --message="Installing node-red..." --time --weight=2
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
npm install --production -g
|
npm install --production
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -81,6 +81,10 @@ ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
# INSTALL NODEJS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_install_nodejs $nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -96,6 +96,13 @@ ynh_script_progression --message="Stopping a systemd service..." --time --weight
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL NODEJS
|
||||||
|
#=================================================
|
||||||
|
# Use Helper instead of package from the repo
|
||||||
|
|
||||||
|
ynh_install_nodejs $nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -115,7 +122,7 @@ ynh_script_progression --message="Installing node-red..." --time --weight=2
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
npm install --production -g
|
npm install --production
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue