From 8c2cd50389ae3f5419f8f81cfbabecc1b8b6e59b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:13:13 +0200 Subject: [PATCH] fix install and upgrade --- scripts/install | 5 +++-- scripts/upgrade | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 9a3797f..78bb486 100644 --- a/scripts/install +++ b/scripts/install @@ -179,6 +179,7 @@ ynh_store_file_checksum --file="$final_path/config/local-production.json" chown -R "$app":"$app" $final_path pushd "$final_path" + ynh_use_nodejs sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd @@ -219,7 +220,7 @@ yunohost service add $app --description "$app daemon for Peertube" --log "/home/ #================================================= ynh_print_info --message="Starting a systemd service..." -#ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" #================================================= # SETUP SSOWAT @@ -246,7 +247,7 @@ ynh_systemd_action --service_name=nginx --action=reload # we need to wait for the service to init peertube's database pushd "$final_path" - #echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root + echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d92fc9c..a2d4d91 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -190,6 +190,7 @@ ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_strin chown -R "$app":"$app" $final_path pushd "$final_path" + ynh_use_nodejs sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd