diff --git a/conf/systemd.service b/conf/systemd.service index 4c201ce..0fb4618 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,7 +10,7 @@ Group=__APP__ Environment="PATH=__ENV_PATH__" Environment=NODE_ENV=production Environment=MONGO_URL=mongodb://127.0.0.1:27017/__DB_NAME__ -Environment=ROOT_URL=https://__DOMAIN____URI__ PORT=__PORT__ +Environment=ROOT_URL=https://__DOMAIN_URI__ PORT=__PORT__ WorkingDirectory=__FINALPATH__ ExecStart=/opt/node_n/bin/node __FINALPATH__/main.js Restart=on-failure diff --git a/scripts/install b/scripts/install index a7f377e..1ac1118 100755 --- a/scripts/install +++ b/scripts/install @@ -189,9 +189,8 @@ popd ynh_print_info "Adding wekan 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 "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service" -ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service" ynh_add_systemd_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 131e51c..fdf9c19 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,9 +70,8 @@ if ynh_version_gt "0.77-2" "${previous_version}" ; then # Create a dedicated systemd config 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 "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service" - ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service" ynh_add_systemd_config fi @@ -90,9 +89,8 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then # Gotta regen the systemd config because mongodb service name changed 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 "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service" ynh_replace_string "__PORT__" "$port" "../conf/systemd.service" - ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service" ynh_add_systemd_config fi