From 6065e32f92f7798ce82d035703fc9260db53172b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 5 Feb 2019 22:45:13 +0100 Subject: [PATCH] Change __ENV_PATH__ to $nodejs_path --- scripts/install | 2 +- scripts/upgrade | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d170248..a7f377e 100755 --- a/scripts/install +++ b/scripts/install @@ -187,7 +187,7 @@ popd # Create a dedicated systemd config ynh_print_info "Adding wekan systemd service ..." -ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" +ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service" ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service" ynh_replace_string "__URI__" "$path_url" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service" diff --git a/scripts/upgrade b/scripts/upgrade index bee0fb8..131e51c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,8 +66,9 @@ fi if ynh_version_gt "0.77-2" "${previous_version}" ; then ynh_install_nodejs 8.9.3 + ynh_use_nodejs # Create a dedicated systemd config - ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" + ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service" ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service" ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service" @@ -84,9 +85,10 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then ynh_install_app_dependencies "mongodb mongodb-server" yunohost service remove mongod yunohost service add mongodb --log "/var/log/mongodb/mongodb.log" + ynh_use_nodejs # Gotta regen the systemd config because mongodb service name changed - ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" + ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service" ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service" ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"