mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
add logging for starting/restarting corrosion service
This commit is contained in:
@@ -71,10 +71,12 @@ func (nc *networkController) Run(ctx context.Context) error {
|
||||
|
||||
if nc.corroService.Running() {
|
||||
// Corrosion service was running before the WireGuard network was configured so we need to restart it.
|
||||
slog.Info("Restarting corrosion service to apply new configuration with WireGuard network.")
|
||||
if err := nc.corroService.Restart(ctx); err != nil {
|
||||
return fmt.Errorf("restart corrosion service: %w", err)
|
||||
}
|
||||
} else {
|
||||
slog.Info("Starting corrosion service.")
|
||||
if err := nc.corroService.Start(ctx); err != nil {
|
||||
return fmt.Errorf("start corrosion service: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user