write files in system

This commit is contained in:
Mikaël Cluseau
2019-12-03 10:56:57 +01:00
parent 30c7462a62
commit eaa208fb6d
4 changed files with 18 additions and 3 deletions

View File

@ -127,6 +127,15 @@ func main() {
fatal("failed: ", err)
}
// - write files
for _, fileDef := range cfg.Files {
log.Print("writing ", fileDef.Path)
filePath := filepath.Join("/system", fileDef.Path)
ioutil.WriteFile(filePath, []byte(fileDef.Content), fileDef.Mode)
}
// clean zombies
cleanZombies()