returned existing files to origin during restruct
This commit is contained in:
parent
7fbb0fe7e1
commit
a2ed11b2fb
19 changed files with 1678 additions and 102 deletions
|
|
@ -15,7 +15,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/amidaware/rmmagent/agent/utils"
|
||||
"github.com/amidaware/taskmaster"
|
||||
ps "github.com/elastic/go-sysinfo"
|
||||
"github.com/go-ole/go-ole"
|
||||
"github.com/go-ole/go-ole/oleutil"
|
||||
|
|
@ -433,28 +432,6 @@ func SystemRebootRequired() (bool, error) {
|
|||
return false, nil
|
||||
}
|
||||
|
||||
// CleanupSchedTasks removes all tacticalrmm sched tasks during uninstall
|
||||
func CleanupSchedTasks() {
|
||||
conn, err := taskmaster.Connect()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer conn.Disconnect()
|
||||
|
||||
tasks, err := conn.GetRegisteredTasks()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, task := range tasks {
|
||||
if strings.HasPrefix(task.Name, "TacticalRMM_") {
|
||||
conn.DeleteTask(fmt.Sprintf("\\%s", task.Name))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.Release()
|
||||
}
|
||||
|
||||
func KillHungUpdates() {
|
||||
procs, err := ps.Processes()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue