diff --git a/scripts/install b/scripts/install index 53d2138..6f23bde 100644 --- a/scripts/install +++ b/scripts/install @@ -90,10 +90,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -130,6 +126,10 @@ pushd "$final_path" ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower install --allow-root popd +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1a70a51..397e090 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,10 +123,10 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60 pushd "$final_path" - ynh_exec_warn_less npm install --allow-root - ynh_exec_warn_less npm install -g bower - ynh_exec_warn_less bower update --allow-root - ynh_exec_warn_less npm i + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install -g bower + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower update --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm i popd #=================================================