mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-07-24 23:52:58 +00:00
apcssh: minor log and logic clarity
This commit is contained in:
parent
f1dd079632
commit
841a459dca
4 changed files with 7 additions and 11 deletions
pkg/apcssh
|
@ -13,10 +13,8 @@ import (
|
|||
func (cli *Client) RestartWebUI() error {
|
||||
result, err := cli.cmd("reboot -Y")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !strings.EqualFold(result.code, "e000") {
|
||||
return fmt.Errorf("apcssh: failed to restart web ui (%w)", err)
|
||||
} else if !strings.EqualFold(result.code, "e000") {
|
||||
return fmt.Errorf("apcssh: failed to restart web ui (%s: %s)", result.code, result.codeText)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue