add optional webui restart

This commit is contained in:
Greg T. Wallace 2024-02-05 18:25:55 -05:00
parent 29cd44077b
commit 2b46f33af8
6 changed files with 103 additions and 28 deletions
pkg/app

View file

@ -36,6 +36,7 @@ type config struct {
fingerprint *string
username *string
password *string
restartWebUI *bool
insecureCipher *bool
}
}
@ -93,6 +94,7 @@ func (app *app) getConfig(args []string) error {
cfg.install.fingerprint = installFlags.StringLong("fingerprint", "", "the SHA256 fingerprint value of the ups' ssh server")
cfg.install.username = installFlags.StringLong("username", "", "username to login to the apc ups")
cfg.install.password = installFlags.StringLong("password", "", "password to login to the apc ups")
cfg.install.restartWebUI = installFlags.BoolLong("restartwebui", "some devices may need a webui restart to begin using the new cert, enabling this option sends the restart command after the p15 is installed")
cfg.install.insecureCipher = installFlags.BoolLong("insecurecipher", "allows the use of insecure ssh ciphers (NOT recommended)")
installCmd := &ff.Command{