templatefile/pkg/configs/system_services.go

28 lines
507 B
Go
Raw Normal View History

2022-06-23 18:03:09 +02:00
package configs
import "fmt"
type SystemService struct {
Name string `json:"Name"`
Enabled bool `json:"Enabled"`
}
func (sys *SystemService) Manage() error {
if sys.Enabled {
fmt.Printf("Processing Daemon %s", sys.Name)
} else {
fmt.Printf("Nothing to do for daemone %s\n", sys.Name)
}
return nil
}
func (sys *SystemService) Start() error {
fmt.Printf("Starting %s\n", sys.Name)
return nil
}
func (sys *SystemService) Stop() error {
fmt.Printf("Stoping %s\n", sys.Name)
return nil
}