2019-08-13 09:48:47 -05:00
|
|
|
package main
|
|
|
|
|
2019-08-19 20:46:11 -05:00
|
|
|
import "log"
|
2019-08-14 17:31:13 -05:00
|
|
|
|
2019-08-13 09:48:47 -05:00
|
|
|
func main() {
|
2019-09-29 12:38:58 -05:00
|
|
|
isCreated := doesConfigExist()
|
|
|
|
|
|
|
|
if isCreated == false {
|
|
|
|
createTemplateConfig(isCreated)
|
|
|
|
writeTemplateConfig("config.yaml")
|
|
|
|
}
|
|
|
|
|
2019-08-13 10:01:26 -05:00
|
|
|
config := initializeConfig("config.yaml")
|
2019-08-13 10:43:40 -05:00
|
|
|
sshConn, sshConfig := initializeConnection(config)
|
2019-08-14 17:31:13 -05:00
|
|
|
clientConns := sshConn.dialConnection(sshConfig)
|
2019-08-18 17:12:47 -05:00
|
|
|
_ = sshConn.openSession(clientConns)
|
|
|
|
success := sshConn.executeSFTP(clientConns)
|
2019-08-19 20:46:11 -05:00
|
|
|
log.Println(success)
|
2019-08-13 09:48:47 -05:00
|
|
|
}
|