From f14ae6c9f44dd28162c8d4007135367ef28535a6 Mon Sep 17 00:00:00 2001 From: philc Date: Sat, 2 Nov 2024 16:13:52 +0100 Subject: [PATCH] fix setup --- apxtri/apxtri.js | 1 + apxtri/setup/nginx.maincf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apxtri/apxtri.js b/apxtri/apxtri.js index 5892846..d5e1789 100755 --- a/apxtri/apxtri.js +++ b/apxtri/apxtri.js @@ -118,6 +118,7 @@ apxtri.setup = async () => { // check nginx conf and eventually change if not starting by user "current user"; let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8"); if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) { + initadminapi.mainpath=initadminapi.townpath.replace(`/${initadminapi.townId}-${initadminapi.nationId}`,"") const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf","utf8"); console.log("Modify /etc/nginx/nginx.conf"); fs.outputFileSync( diff --git a/apxtri/setup/nginx.maincf b/apxtri/setup/nginx.maincf index 34561f0..d6c8bd6 100644 --- a/apxtri/setup/nginx.maincf +++ b/apxtri/setup/nginx.maincf @@ -38,5 +38,5 @@ http { # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; - include {{{townpath}}}/*/*/nginx/*.conf; + include {{{mainpath}}}/*/*/nginx/*.conf; }