first working version
This commit is contained in:
parent
372915e24d
commit
6da132106f
18 changed files with 519 additions and 96 deletions
|
|
@ -15,6 +15,18 @@ func NewSystemdManager(service string) *SystemdManager {
|
|||
return &SystemdManager{service}
|
||||
}
|
||||
|
||||
func (sm *SystemdManager) Status(ctx context.Context) error {
|
||||
return exec.CommandContext(ctx, systemctl, "status", sm.service).Run()
|
||||
}
|
||||
|
||||
func (sm *SystemdManager) Start(ctx context.Context) error {
|
||||
return exec.CommandContext(ctx, systemctl, "start", sm.service).Run()
|
||||
}
|
||||
|
||||
func (sm *SystemdManager) Stop(ctx context.Context) error {
|
||||
return exec.CommandContext(ctx, systemctl, "stop", sm.service).Run()
|
||||
}
|
||||
|
||||
func (sm *SystemdManager) Reload(ctx context.Context) error {
|
||||
return exec.CommandContext(ctx, systemctl, "reload", sm.service).Run()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue