Skip to content

Commit

Permalink
Merge pull request #1670 from mrpalide/fix/add-shutdown-api-remove-re…
Browse files Browse the repository at this point in the history
…boot-logic

Improve UI and Backend on `reboot` and `turn off`
  • Loading branch information
jdknives authored Nov 2, 2023
2 parents f962b68 + 1ef913c commit c20a6bf
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 581 deletions.
2 changes: 0 additions & 2 deletions cmd/skywire-cli/commands/config/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
utilenv "github.com/skycoin/skywire-utilities/pkg/skyenv"
"github.com/skycoin/skywire/pkg/app/appserver"
"github.com/skycoin/skywire/pkg/dmsgc"
"github.com/skycoin/skywire/pkg/restart"
"github.com/skycoin/skywire/pkg/routing"
"github.com/skycoin/skywire/pkg/skyenv"
"github.com/skycoin/skywire/pkg/transport/network"
Expand Down Expand Up @@ -776,7 +775,6 @@ var genConfigCmd = &cobra.Command{
conf.DmsgHTTPServerPath = visorconfig.LocalPath + "/" + visorconfig.Custom
conf.StunServers = services.StunServers //utilenv.GetStunServers()
conf.ShutdownTimeout = visorconfig.DefaultTimeout
conf.RestartCheckDelay = visorconfig.Duration(restart.DefaultCheckDelay)

conf.Dmsgpty = &visorconfig.Dmsgpty{
DmsgPort: visorconfig.DmsgPtyPort,
Expand Down
17 changes: 0 additions & 17 deletions cmd/skywire-cli/commands/visor/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func init() {
root = true
}
RootCmd.AddCommand(startCmd)
RootCmd.AddCommand(restartCmd)
RootCmd.AddCommand(reloadCmd)
RootCmd.AddCommand(shutdownCmd)
startCmd.Flags().BoolVarP(&sourcerun, "src", "s", false, "'go run' external commands from the skywire sources")
Expand Down Expand Up @@ -59,22 +58,6 @@ var startCmd = &cobra.Command{
},
}

var restartCmd = &cobra.Command{
Use: "restart",
Short: "restart visor",
Run: func(cmd *cobra.Command, args []string) {
rpcClient, err := clirpc.Client(cmd.Flags())
if err != nil {
os.Exit(1)
}
err = rpcClient.Restart()
if err != nil {
internal.PrintFatalError(cmd.Flags(), fmt.Errorf("error restarting visor"))
}
internal.PrintOutput(cmd.Flags(), "Visor restarted", fmt.Sprintln("Visor restarted"))
},
}

func gort(ctx context.Context, fn func() error) error {
errs, _ := errgroup.WithContext(ctx)
errs.Go(func() error {
Expand Down
237 changes: 0 additions & 237 deletions pkg/restart/restart.go

This file was deleted.

106 changes: 0 additions & 106 deletions pkg/restart/restart_test.go

This file was deleted.

Loading

0 comments on commit c20a6bf

Please sign in to comment.