mirror of
https://github.com/YunoHost-Apps/nodered_ynh.git
synced 2024-09-03 19:46:25 +02:00
Fix NodeJS usage
This commit is contained in:
parent
c492d7b9ee
commit
8e119b97f2
3 changed files with 10 additions and 8 deletions
|
@ -7,8 +7,8 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
Environment=NODE_ENV=production
|
||||
ExecStart=__NODEJS_PATH__/node red.js -p __PORT__ -u __FINALPATH__/data
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=__YNH_NODE__ red.js -p __PORT__ -u __FINALPATH__/data
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
|
||||
|
|
|
@ -95,10 +95,11 @@ ynh_script_progression --message="Installing Node-RED..." --weight=2
|
|||
|
||||
chown -R $app: $final_path
|
||||
|
||||
ynh_use_nodejs
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less exec_as $app env PATH=$PATH npm install --production
|
||||
ynh_exec_warn_less exec_as $app env PATH=$PATH npm install node-red-dashboard
|
||||
ynh_exec_warn_less exec_as $app $ynh_node_load_PATH $ynh_npm install --production
|
||||
ynh_exec_warn_less exec_as $app $ynh_node_load_PATH $ynh_npm install node-red-dashboard
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -128,10 +128,11 @@ ynh_script_progression --message="Installing Node-RED..." --weight=30
|
|||
chown -R root:root $final_path
|
||||
chown -R $app: $final_path/data
|
||||
|
||||
ynh_use_nodejs
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less exec_as $app env PATH=$PATH npm install --production
|
||||
ynh_exec_warn_less exec_as $app env PATH=$PATH npm install node-red-dashboard
|
||||
ynh_exec_warn_less exec_as $app $ynh_node_load_PATH $ynh_npm install --production
|
||||
ynh_exec_warn_less exec_as $app $ynh_node_load_PATH $ynh_npm install node-red-dashboard
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue