This repository has been archived on 2026-05-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
zx_ansible_tools/ansible-supervision/recup_info_zimbra/pkg/zxsuite/zxsuite.go
T
Antoine Ouvrard 3fe3b6e90a readd directory
2023-03-09 17:29:50 +01:00

23 lines
505 B
Go

package zxsuite
import (
"log"
"os/exec"
)
func CmdZxSuite(module string, cmd string) ([]byte, error) {
outputZx, err := exec.Command("sudo", "-u", "zimbra", "/opt/zimbra/bin/zxsuite", "--json", module, cmd).Output()
if err != nil {
log.Fatal(err)
}
return outputZx, nil
}
func CmdZmcontrol(cmd string) ([]byte, error) {
outputZmcontrol, err := exec.Command("sudo", "-u", "zimbra", "/opt/zimbra/bin/zmcontrol", cmd).Output()
if err != nil {
log.Fatal(err)
}
return outputZmcontrol, nil
}