1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/petrolette_ynh.git synced 2024-09-03 19:56:26 +02:00

use specific $home value to avoid right error

This commit is contained in:
Tobias Ollive 2021-04-12 17:16:50 +02:00
parent 994f8b35c2
commit 2957d67133
3 changed files with 16 additions and 4 deletions

View file

@ -99,17 +99,23 @@ ynh_system_user_create --username=$app --home_dir=$final_path
ynh_script_progression --message="Installing application using node..." ynh_script_progression --message="Installing application using node..."
pushd $final_path pushd $final_path
# use custom home value to avoid bower storing values in root and have right errors
TMP_HOME=$HOME
HOME=$(pwd)
ynh_use_nodejs ynh_use_nodejs
ynh_npm install ynh_npm install
HOME=$TMP_HOME
popd popd
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
chown -R $app:$app $final_path chown -R $app:$app $final_path
chmod -R o-rwx $final_path chmod -R o-rwx $final_path
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================

View file

@ -68,8 +68,11 @@ ynh_script_progression --message="Reinstalling the app ..." --weight=5
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs TMP_HOME=$HOME
ynh_npm install HOME=$(pwd)
ynh_use_nodejs
ynh_npm install
HOME=$TMP_HOME
popd popd

View file

@ -84,8 +84,11 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_script_progression --message="Upgrading the app..." --weight=5 ynh_script_progression --message="Upgrading the app..." --weight=5
pushd $final_path pushd $final_path
ynh_use_nodejs TMP_HOME=$HOME
ynh_npm install HOME=$(pwd)
ynh_use_nodejs
ynh_npm install
HOME=$TMP_HOME
popd popd
#================================================= #=================================================