Add: Download the nu and deno binaries from GitHub
Signed-off-by: David Randall <David@NiceGuyIT.biz>
This commit is contained in:
parent
6ba3272dc0
commit
87e1b29ef6
8 changed files with 592 additions and 11 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
|
|
@ -258,8 +259,13 @@ func (a *Agent) Install(i *Installer) {
|
|||
// check in once
|
||||
a.DoNatsCheckIn()
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
// Used for Nushell and Deno binaries
|
||||
os.MkdirAll(nixAgentBinDir, 0755)
|
||||
}
|
||||
|
||||
if runtime.GOOS == "darwin" {
|
||||
os.MkdirAll(nixAgentDir, 0755)
|
||||
os.MkdirAll(nixAgentBinDir, 0755)
|
||||
self, _ := os.Executable()
|
||||
copyFile(self, nixAgentBin)
|
||||
os.Chmod(nixAgentBin, 0755)
|
||||
|
|
@ -300,6 +306,8 @@ func (a *Agent) Install(i *Installer) {
|
|||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
os.MkdirAll(path.Join(a.ProgramDir, "bin"), 0755)
|
||||
|
||||
// send software api
|
||||
a.SendSoftware()
|
||||
|
||||
|
|
@ -341,7 +349,7 @@ func (a *Agent) Install(i *Installer) {
|
|||
}
|
||||
}
|
||||
|
||||
a.installerMsg("Installation was successfull!\nAllow a few minutes for the agent to properly display in the RMM", "info", i.Silent)
|
||||
a.installerMsg("Installation was successful!\nAllow a few minutes for the agent to properly display in the RMM", "info", i.Silent)
|
||||
}
|
||||
|
||||
func copyFile(src, dst string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue