update /config/conf.json when conf.json saved from Superuser panel
parent
21eee0f477
commit
37ad70ba6c
|
@ -119,6 +119,21 @@ module.exports = function(s,config,lang,app){
|
|||
ip: resp.ip,
|
||||
old:jsonfile.readFileSync(s.location.config)
|
||||
})
|
||||
try{
|
||||
const dockerConfigFile = '/config/conf.json'
|
||||
fs.stat(dockerConfigFile,(err) => {
|
||||
if(!err){
|
||||
fs.stat(s.mainDirectory + '/thisIsDocker.txt',(err) => {
|
||||
if(!err){
|
||||
fs.writeFile(dockerConfigFile,JSON.stringify(postBody,null,3),function(){
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}catch(err){
|
||||
console.log(err)
|
||||
}
|
||||
jsonfile.writeFile(s.location.config,postBody,{spaces: 2},function(){
|
||||
s.tx({f:'save_configuration'},'$')
|
||||
})
|
||||
|
|
|
@ -63,8 +63,6 @@ try{
|
|||
fs.stat('../thisIsDocker.txt',(err) => {
|
||||
if(!err){
|
||||
fs.writeFile(dockerConfigFile,JSON.stringify(config,null,3),function(){
|
||||
console.log('Changes Complete. Here is what it is now.')
|
||||
console.log(JSON.stringify(config,null,2))
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue