update for new exe format

This commit is contained in:
wh1te909 2022-06-26 09:02:48 -07:00
parent 1ac1ca57e2
commit aed33b9a95
4 changed files with 17 additions and 2 deletions

View file

@ -384,6 +384,7 @@ func (a *Agent) CleanupAgentUpdates() {
return
}
// winagent-v* is deprecated
files, err := filepath.Glob("winagent-v*.exe")
if err == nil {
for _, f := range files {
@ -391,6 +392,13 @@ func (a *Agent) CleanupAgentUpdates() {
}
}
agents, err := filepath.Glob("tacticalagent-v*.exe")
if err == nil {
for _, f := range agents {
os.Remove(f)
}
}
cderr = os.Chdir(os.Getenv("TMP"))
if cderr != nil {
a.Logger.Errorln(cderr)