diff --git a/scripts/_common.sh b/scripts/_common.sh index 55e8c18..c09932f 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,8 +6,6 @@ nodejs_version=20 -n8n_version=$(ynh_app_upstream_version) - timezone="$(cat /etc/timezone)" main_domain=$(cat /etc/yunohost/current_host) diff --git a/scripts/install b/scripts/install index c90ba66..6d403b9 100755 --- a/scripts/install +++ b/scripts/install @@ -59,7 +59,7 @@ ynh_script_progression --message="Installing $app..." --weight=2 pushd $install_dir ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@$(ynh_app_upstream_version) ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \ --replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \ --target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js" diff --git a/scripts/upgrade b/scripts/upgrade index de817c7..eeeadbe 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,7 +82,7 @@ ynh_script_progression --message="Installing $app..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src pushd $install_dir ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@$(ynh_app_upstream_version) ynh_replace_string --match_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'),$" \ --replace_string="secure: config_1.default.getEnv('userManagement.emails.smtp.secure'), tls: {servername:'${main_domain}'}," \ --target_file="node_modules/n8n/dist/UserManagement/email/NodeMailer.js"