fix setup

This commit is contained in:
philc 2024-11-02 16:13:52 +01:00
parent 2c03dda67d
commit f14ae6c9f4
2 changed files with 2 additions and 1 deletions

View File

@ -118,6 +118,7 @@ apxtri.setup = async () => {
// check nginx conf and eventually change if not starting by user "current user"; // check nginx conf and eventually change if not starting by user "current user";
let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8"); let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8");
if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) { 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"); const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf","utf8");
console.log("Modify /etc/nginx/nginx.conf"); console.log("Modify /etc/nginx/nginx.conf");
fs.outputFileSync( fs.outputFileSync(

View File

@ -38,5 +38,5 @@ http {
# Virtual Host Configs # Virtual Host Configs
## ##
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
include {{{townpath}}}/*/*/nginx/*.conf; include {{{mainpath}}}/*/*/nginx/*.conf;
} }