update /config/conf.json when conf.json saved from Superuser panel

install-with-shinobicctv-user-instead-of-root
Moe 2020-08-26 10:34:10 -07:00
parent 21eee0f477
commit 37ad70ba6c
2 changed files with 15 additions and 2 deletions

View File

@ -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'},'$')
})

View File

@ -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))
})
}
})