aboutsummaryrefslogtreecommitdiffstats
path: root/c_exec.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-18 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-18 20:20:20 +0100
commitff46232876da57297d6f8b46e311fcd0f659b5cf (patch)
tree300b49d4c3ba84d1a7ac8e0a06ba68563c03395d /c_exec.go
parentadded LICENSE (diff)
downloadhardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.gz
hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.bz2
hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.xz
hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.zst
hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.zip
up
Diffstat (limited to '')
-rw-r--r--c_exec.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/c_exec.go b/c_exec.go
index fc42957..8193068 100644
--- a/c_exec.go
+++ b/c_exec.go
@@ -101,7 +101,8 @@ func c_format_ssh(host *HostNode) []string {
return cmd_fmt
}
-func c_format_rdp() {
+func c_format_rdp(host *HostNode) []string {
+ return []string{""}
}
func c_format_cmd(id uint64, lhost *HostList) {
@@ -114,21 +115,18 @@ func c_format_cmd(id uint64, lhost *HostList) {
}
if host.Type == 0 {
cmd_fmt = c_format_ssh(host)
+ } else if host.Type == 1 {
+ cmd_fmt = c_format_rdp(host)
+ } else if host.Type > 1 {
+ c_die("type not found", nil)
}
c_exec_cmd(cmd_fmt)
}
-func c_display_servers(lhost *HostList) {
- host := lhost.head
-
+func c_exec(id uint64, lhost *HostList) {
if lhost.head == nil {
fmt.Println("no hosts")
return
}
- for host != nil {
- fmt.Println(host.ID, host.Folder + host.Name)
- host = host.next
- }
- fmt.Println()
- c_format_cmd(4, lhost)
+ c_format_cmd(id, lhost)
}