From 8d98b5640a6a3bfc9e5c5a1f5059ff291c30c97a Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 8 Jul 2017 18:20:55 +0200 Subject: [PATCH] N (#6) * Update nodebb.service * Update install * Update install * Update and rename .fonctions to _common.sh * Update install * Update install * Update install --- scripts/_common.sh | 1 + scripts/install | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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