Close host connections after all command have been run, added some flags to version subcommand

This commit is contained in:
2023-03-10 16:01:02 -06:00
parent 9ffa2e473e
commit 2ca5f193e4
5 changed files with 93 additions and 16 deletions

View File

@ -33,4 +33,9 @@ func Backup(cmd *cobra.Command, args []string) {
backyConfOpts.InitConfig()
config := backy.ReadConfig(backyConfOpts)
config.RunBackyConfig("")
for _, host := range config.Hosts {
if host.SshClient != nil {
host.SshClient.Close()
}
}
}