diff --git a/scripts/_common.sh b/scripts/_common.sh index 7945aad..093e1e7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -96,6 +96,7 @@ ynh_remove_systemd_config () { fi } + SETUP_SOURCE () { # Télécharge la source, décompresse et copie dans $final_path src_url=$(cat ../conf/app.src | grep SOURCE_URL | cut -d'>' -f2) src_checksum=$(cat ../conf/app.src | grep SOURCE_SUM | cut -d= -f2) diff --git a/scripts/install b/scripts/install index 27a4e3b..711bc91 100644 --- a/scripts/install +++ b/scripts/install @@ -124,8 +124,9 @@ sudo chown www-data:www-data $final_path -R sudo service mongod start script_dir="$PWD" pushd "$final_path" -sudo npm install --production -sudo npm install -g mongo +ynh_use_nodejs +sudo_path npm install --production >> $install_log 2>&1 +sudo_path npm install -g mongo popd sudo yunohost firewall allow Both $port @@ -171,9 +172,9 @@ sudo sed -i "s@dbpass@$dbpass@g" $final_path/config.json # CONFIGURE NODEBB #================================================= -pushd "$final_path" +pushd $final_path sudo chown -R $app: $final_path -sudo ./nodebb setup <<< \ +sudo_path ./nodebb setup <<< \ "$admin_name" popd