Hi! I'm trying to use this very interesting tool and got it working flawlessly on Linux, but have some issues on Windows 10.
I have a config like this:
{
"Listeners" : ["UDP:9", "UDP:7", "HTTP:8009" ],
"LogLevel" : "INFO",
"ExitIfAnyPortIsAlreadyUsed" : true,
"AvoidDualUDPSending" : {
"Active": false,
"Delay": "100ms"
},
"Commands" : [{
"Operation" : "sleep",
"Command" : "c:\\bin\\psshutdown.exe -d -t 0 -v 0",
"Default" : true
}, {
"Operation" : "reboot",
"Command" : "c:\\windows\\system32\\shutdown.exe /r /f /t 0 /d u:0:0",
"Default" : false
}, {
"Operation" : "killgames",
"Command" : "C:\\Windows\\System32\\cmd.exe /c d:\\home\\Serge\\bin\\vanya-killgames.cmd",
"Default" : false
}]
}
And I found that from time to time it stops working at all when runnign as a service (installed via NSSM):
~ » curl -v http://dzeta.home:8009/sleep
* Trying 192.168.113.7:8009...
* Connected to dzeta.home (192.168.113.7) port 8009 (#0)
> GET /sleep HTTP/1.1
> Host: dzeta.home:8009
> User-Agent: curl/7.81.0
> Accept: */*
>
^C
~ » curl -v http://dzeta.home:8009/sleep
* Trying 192.168.113.7:8009...
* Connected to dzeta.home (192.168.113.7) port 8009 (#0)
> GET /sleep HTTP/1.1
> Host: dzeta.home:8009
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Sun, 03 Jul 2022 17:40:55 GMT
< Content-Length: 120
< Content-Type: text/xml; charset=utf-8
<
<?xml version="1.0" encoding="UTF-8"?>
<result>
<operation>sleep</operation>
<successful>true</successful>
* Connection #0 to host dzeta.home left intact
</result>%
The first case is it's running as a service, the second - running manully in admin-level cmd.
Also wakeonline command with reversed MAC doesn't work in first case as well.
Is there any way to see activity as log (file or windows events) when running as a service?