2023-08-23 23:57:34 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "net/http/pprof"
|
|
|
|
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
|
|
|
|
lcli "github.com/filecoin-project/lotus/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
var stopCmd = &cli.Command{
|
|
|
|
Name: "stop",
|
2024-03-15 21:38:13 +00:00
|
|
|
Usage: "Stop a running Curio process",
|
2023-08-23 23:57:34 +00:00
|
|
|
Flags: []cli.Flag{},
|
|
|
|
Action: func(cctx *cli.Context) error {
|
|
|
|
api, closer, err := lcli.GetAPI(cctx)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
defer closer()
|
|
|
|
|
|
|
|
err = api.Shutdown(lcli.ReqContext(cctx))
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|