From 0eb54230866416dcfb8d83e58a11746b2fffcf62 Mon Sep 17 00:00:00 2001 From: artemijspavlovs <19916123+artemijspavlovs@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:59:23 +0700 Subject: [PATCH] fix: stop relayer services during setup --- cmd/relayer/setup/setup.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/relayer/setup/setup.go b/cmd/relayer/setup/setup.go index e61f5ab5..5ebfed38 100644 --- a/cmd/relayer/setup/setup.go +++ b/cmd/relayer/setup/setup.go @@ -23,6 +23,7 @@ import ( "github.com/dymensionxyz/roller/utils/rollapp" rollapputils "github.com/dymensionxyz/roller/utils/rollapp" sequencerutils "github.com/dymensionxyz/roller/utils/sequencer" + servicemanager "github.com/dymensionxyz/roller/utils/service_manager" ) // TODO: cleanup required, a lot of duplicate code in this cmd @@ -36,6 +37,13 @@ func Cmd() *cobra.Command { cmd.Flag(initconfig.GlobalFlagNames.Home).Value.String(), ) + pterm.Info.Println("stopping relayer services, if any...") + err := servicemanager.StopSystemServices(consts.AllServices) + if err != nil { + pterm.Error.Println("failed to stop system services: ", err) + return + } + raData, hd, kb, err := getPreRunInfo(home) if err != nil { pterm.Error.Println("failed to run pre-flight checks: ", err)