remove unused funcs
This commit is contained in:
parent
7a75d4d5a3
commit
f200862b1a
21
main.go
21
main.go
@ -51,9 +51,6 @@ func main() {
|
|||||||
meshDir := flag.String("meshdir", "", "Path to custom meshcentral dir")
|
meshDir := flag.String("meshdir", "", "Path to custom meshcentral dir")
|
||||||
meshNodeID := flag.String("meshnodeid", "", "Mesh Node ID")
|
meshNodeID := flag.String("meshnodeid", "", "Mesh Node ID")
|
||||||
cert := flag.String("cert", "", "Path to domain CA .pem")
|
cert := flag.String("cert", "", "Path to domain CA .pem")
|
||||||
updateurl := flag.String("updateurl", "", "Download link to updater")
|
|
||||||
inno := flag.String("inno", "", "Inno setup file")
|
|
||||||
updatever := flag.String("updatever", "", "Update version")
|
|
||||||
silent := flag.Bool("silent", false, "Do not popup any message boxes during installation")
|
silent := flag.Bool("silent", false, "Do not popup any message boxes during installation")
|
||||||
proxy := flag.String("proxy", "", "Use a http proxy")
|
proxy := flag.String("proxy", "", "Use a http proxy")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
@ -127,12 +124,6 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.RunTask(*taskPK)
|
a.RunTask(*taskPK)
|
||||||
case "update":
|
|
||||||
if *updateurl == "" || *inno == "" || *updatever == "" {
|
|
||||||
updateUsage()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
a.AgentUpdate(*updateurl, *inno, *updatever)
|
|
||||||
case "install":
|
case "install":
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
u, err := user.Current()
|
u, err := user.Current()
|
||||||
@ -145,7 +136,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if *api == "" || *clientID == 0 || *siteID == 0 || *token == "" {
|
if *api == "" || *clientID == 0 || *siteID == 0 || *token == "" {
|
||||||
installUsage()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.Install(&agent.Installer{
|
a.Install(&agent.Installer{
|
||||||
@ -191,14 +181,3 @@ func setupLogging(level, to *string) {
|
|||||||
log.SetOutput(logFile)
|
log.SetOutput(logFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func installUsage() {
|
|
||||||
exe, _ := os.Executable()
|
|
||||||
u := fmt.Sprintf(`Usage: %s -m install -api <https://api.example.com> -client-id X -site-id X -auth <TOKEN>`, exe)
|
|
||||||
fmt.Println(u)
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateUsage() {
|
|
||||||
u := `Usage: tacticalrmm.exe -m update -updateurl https://example.com/tacticalagent-vX.X.X.exe -inno tacticalagent-vX.X.X.exe -updatever 1.1.1`
|
|
||||||
fmt.Println(u)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user