diff --git a/scripts/change_url b/scripts/change_url index 776135c..30d2896 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -20,6 +20,9 @@ old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN new_path=$YNH_APP_NEW_PATH +db_name=$(ynh_app_setting_get $app db_name) +port=$(ynh_app_setting_get $app port) + app=$YNH_APP_INSTANCE_NAME #================================================= @@ -98,12 +101,12 @@ fi ynh_print_info "Updating .env configuration..." ynh_systemd_action --action=stop --service_name=$app --log_path="systemd" +ynh_use_nodejs ynh_replace_string "__NODEJS_PATH__" "$nodejs_path" "$final_path/.env" ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/.env" ynh_replace_string "__DOMAIN_URI__" "$new_domain$new_path" "$final_path/.env" ynh_replace_string "__PORT__" "$port" "$final_path/.env" ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Kadira: completed instrumenting the app" -sleep 10 #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 771a341..32199e9 100755 --- a/scripts/install +++ b/scripts/install @@ -101,6 +101,7 @@ ynh_print_info "Installing dependencies..." ynh_print_info "Installing nodejs ..." ynh_install_nodejs 8.15.1 +ynh_use_nodejs ynh_print_info "Installing mongodb dependencies ..." ynh_install_app_dependencies "mongodb mongodb-server" diff --git a/scripts/restore b/scripts/restore index 52f8756..67f0303 100644 --- a/scripts/restore +++ b/scripts/restore @@ -86,6 +86,7 @@ ynh_print_info "Reinstalling dependencies..." # Define and install dependencies ynh_install_nodejs 8.15.1 +ynh_use_nodejs # Install mongodb ynh_install_app_dependencies "mongodb mongodb-server"