diff --git a/shared/services/stader/client.go b/shared/services/stader/client.go index a9fcc628f..403457155 100644 --- a/shared/services/stader/client.go +++ b/shared/services/stader/client.go @@ -499,18 +499,16 @@ func (c *Client) MigrateLegacyConfig(legacyConfigFilePath string, legacySettings } // Install the Stader service -func (c *Client) InstallService(verbose, noDeps bool, network, version, path string, dataPath string) error { +func (c *Client) InstallService(verbose, noDeps bool, network, version, path, dataPath string) error { return c.executeScript(verbose, noDeps, network, version, path, dataPath, InstallerURL) } -// Install the Stader service +// Update the Stader package files func (c *Client) UpdateStaderPackage(verbose, noDeps bool, network, version, path, dataPath string) error { return c.executeScript(verbose, noDeps, network, version, path, dataPath, UpdateURL) } -// Install the Stader service -func (c *Client) executeScript(verbose, noDeps bool, network, version, path, dataPath, url string) error { - +func (c *Client) executeScript(verbose, noDeps bool, network, version, path, dataPath, remoteURL string) error { downloader, err := c.getDownloader() if err != nil { return err @@ -532,7 +530,7 @@ func (c *Client) executeScript(verbose, noDeps bool, network, version, path, dat } // Initialize installation command - cmd, err := c.newCommand(fmt.Sprintf("%s %s | sh -s -- %s", downloader, fmt.Sprintf(url, version), strings.Join(flags, " "))) + cmd, err := c.newCommand(fmt.Sprintf("%s %s | sh -s -- %s", downloader, fmt.Sprintf(remoteURL, version), strings.Join(flags, " "))) if err != nil { return err diff --git a/stader-cli/service/commands.go b/stader-cli/service/commands.go index 38b77a041..042ee215c 100644 --- a/stader-cli/service/commands.go +++ b/stader-cli/service/commands.go @@ -483,7 +483,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { { Name: "export-eth1-data", Usage: "Exports the execution client (eth1) chain data to an external folder. Use this if you want to back up your chain data before switching execution clients.", - UsageText: "rocketpool service export-eth1-data target-folder", + UsageText: "stader-cli service export-eth1-data target-folder", Flags: []cli.Flag{ cli.BoolFlag{ Name: "force", @@ -515,7 +515,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { { Name: "import-eth1-data", Usage: "Imports execution client (eth1) chain data from an external folder. Use this if you want to restore the data from an execution client that you previously backed up.", - UsageText: "rocketpool service import-eth1-data source-folder", + UsageText: "stader-cli service import-eth1-data source-folder", Action: func(c *cli.Context) error { // Validate args diff --git a/stader-cli/service/migration.go b/stader-cli/service/migration.go index ca769cf5d..892796b19 100644 --- a/stader-cli/service/migration.go +++ b/stader-cli/service/migration.go @@ -102,7 +102,7 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra if needInstall { runBeforeUpgrades = append([]ConfigUpgrader{ { - upgradeFunc: install, + upgradeFunc: updateStaderPackage, version: v0, }, }, runBeforeUpgrades...) @@ -144,7 +144,7 @@ func upgradeFuncV140(c *cli.Context) error { return nil } -func install(c *cli.Context) error { +func updateStaderPackage(c *cli.Context) error { staderClient, err := stader.NewClientFromCtx(c) if err != nil { return fmt.Errorf("error NewClientFromCtx: %w", err)