func initializeSlices() error { for _, unit := range sliceUnits { if err := systemd.InitializeSystemdFile(systemd.SliceType, unit.Name, csystemd.SliceUnitTemplate, unit, false); nil != err { return err } } return nil }
func initializeTargets() error { for _, target := range [][]string{ {"container", ""}, {"container-sockets", ""}, {"container-active", "multi-user.target"}, } { name, wants := target[0], target[1] if err := systemd.InitializeSystemdFile(systemd.TargetType, name, csystemd.TargetUnitTemplate, csystemd.TargetUnit{name, wants}, false); err != nil { return err } } return nil }
func initializeSlices() error { for _, name := range []string{ "container", "container-small", } { parent := "container" if name == "container" { parent = "" } if err := systemd.InitializeSystemdFile(systemd.SliceType, name, csystemd.SliceUnitTemplate, csystemd.SliceUnit{name, parent}, false); err != nil { return err } } return nil }
func initializeRouter() error { if err := systemd.InitializeSystemdFile(systemd.UnitType, hostServiceName, rjobs.UnitRouterTemplate, nil, false); err != nil { return err } systemd.IsUnitProperty(systemd.Connection(), hostServiceName+".service", func(p map[string]interface{}) bool { switch p["ActiveState"] { case "active": break case "activating": log.Printf("The Router host service '" + hostServiceName + "' is starting - routing tasks will not be available until it completes") default: log.Printf("The Router host service '" + hostServiceName + "' is not started - router operations will not be available") } return true }) return nil }
func initializeGitHost() error { return systemd.InitializeSystemdFile(systemd.UnitType, "geard-githost", UnitGitHostTemplate, nil, true) }
func initializeSlices() error { return systemd.InitializeSystemdFile(systemd.SliceType, "geard-githost", SliceGitTemplate, nil, false) }
func initializeSlices() error { return systemd.InitializeSystemdFile(systemd.SliceType, hostServiceName, rjobs.SliceRouterTemplate, nil, false) }