suppression de adminapi/www/adminapx/conf/setup_xx.json

This commit is contained in:
philc 2023-06-03 17:55:40 +02:00
parent 9294ff7dba
commit 41dbd92e4a
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/node_modules
/nationchains
/adminapi/www/nginx_adminapx.conf
/adminapi/www/adminapx/conf/setup_xx.json
/yarn*

View File

@ -1 +0,0 @@
{"nationId":"ants","townId":"devfarm","dns":["devfarm-ants"],"comment":"Auto generate setup from apxtrib after node apxtrib nationId:value townId:value dns:domaine_to_access"}

View File

@ -181,9 +181,14 @@ if (
setconf(param);
}
// From git setup-xx is set to nationId:ant townId:farmdev (keyword for dev)
const infotown = fs.readJsonSync(
let infotown = {nationId:"ants",townId:"devfarm",dns:["devfarm-ants"],comment:"Auto generate setup from apxtrib after node apxtrib nationId:value townId:value dns:domaine_to_access"}
if (fs.existsSync(`${__dirname}/adminapi/www/adminapx/conf/setup_xx.json`)){
infotown = fs.readJsonSync(
`${__dirname}/adminapi/www/adminapx/conf/setup_xx.json`
);
}else{
fs.outputJsonSync(`${__dirname}/adminapi/www/adminapx/conf/setup_xx.json`,infotown);
}
if (
!fs.existsSync(