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:
parent
994f8b35c2
commit
2957d67133
3 changed files with 16 additions and 4 deletions
|
@ -99,17 +99,23 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
|||
ynh_script_progression --message="Installing application using node..."
|
||||
|
||||
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_npm install
|
||||
HOME=$TMP_HOME
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R o-rwx $final_path
|
||||
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
|
|
@ -68,8 +68,11 @@ ynh_script_progression --message="Reinstalling the app ..." --weight=5
|
|||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
TMP_HOME=$HOME
|
||||
HOME=$(pwd)
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
HOME=$TMP_HOME
|
||||
popd
|
||||
|
||||
|
||||
|
|
|
@ -84,8 +84,11 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
|||
ynh_script_progression --message="Upgrading the app..." --weight=5
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
TMP_HOME=$HOME
|
||||
HOME=$(pwd)
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
HOME=$TMP_HOME
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue