fix(startup): make watchdog task keep agent alive
- Use Task Scheduler XML instead of /TR - Run -ensure agent in-process, not child - Add console close and panic protection - Guard nil event channels after stop - Add non-Windows stubs for startup/mutex
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package instance
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/config"
|
||||
@@ -9,7 +8,7 @@ import (
|
||||
|
||||
func Detach() error {
|
||||
if AlreadyRunning() {
|
||||
return fmt.Errorf("agent already running")
|
||||
return nil
|
||||
}
|
||||
exe, err := config.InstalledExe()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user