Exemplo n.º 1
0
// create/update /home/core/bin/docker-cleanup.sh
func createDockerCleanup(deps service.ServiceDependencies, flags *service.ServiceFlags) (bool, error) {
	deps.Logger.Info("creating %s", cleanupPath)
	asset, err := templates.Asset(cleanupSource)
	if err != nil {
		return false, maskAny(err)
	}

	changed, err := util.UpdateFile(cleanupPath, asset, scriptFileMode)
	return changed, maskAny(err)
}
Exemplo n.º 2
0
Arquivo: rkt.go Projeto: pulcy/gluon
func createTmpFilesConf(deps service.ServiceDependencies, flags *service.ServiceFlags) (bool, error) {
	deps.Logger.Info("creating %s", tmpFilesConfPath)
	asset, err := templates.Asset(tmpFilesConfSource)
	if err != nil {
		return false, maskAny(err)
	}

	changed, err := util.UpdateFile(tmpFilesConfPath, asset, 0644)
	return changed, maskAny(err)

}