mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 14:14:52 +00:00
chore: simplify cluster controller initialisation, prepare for reset
This commit is contained in:
1 parent
f613d3ce6d
commit
9a88e914f4
6 files changed
+227
-388
No files matched your search
@@ -27,6 +27,15 @@ func (s *SystemdService) Start(ctx context.Context) error {
|
||||
return s.startOrRestart(ctx, "start")
|
||||
}
|
||||
|
||||
func (s *SystemdService) Stop(ctx context.Context) error {
|
||||
if _, err := exec.Command("systemctl", "stop", s.Unit).Output(); err != nil {
|
||||
return fmt.Errorf("systemctl stop %s: %w", s.Unit, err)
|
||||
}
|
||||
slog.Info("Corrosion systemd service stopped.", "unit", s.Unit)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *SystemdService) Restart(ctx context.Context) error {
|
||||
return s.startOrRestart(ctx, "restart")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user