Closed girque closed 6 years ago
Maybe the user permission issue was the source of the problem after all:
sudo shutdown -h now
nohup /path/to/sol_binary > /var/log/sleep-on-lan.log 2>&1 &
as non-rootOk hadn't time to investigate your main issue (which i've never encountered on my side), glad you solved it by yourself.
For non-root execution, i was suggesting the setcap
method in the global README.md (https://github.com/SR-G/sleep-on-lan), but other methods may of course work.
For your additional comments :
Yes I followed the setcap
technique to listen on port 9. But still permissions to write in /var/log/sleep-on-lan.log and also use shutdown
command are needed. As you said there are many methods..
Ok, would #18 do the trick, could you review it ? (already coded, awaiting to see if it would meet your needs)
Would allow :
Questionning another server through MAC addresses rather than IP would be possible but a little bit more complicated (would need to know which network interface to use in order to make the ARP query on).
Yes it is perfect like this. We can get the status of other computers in the local network. No need for more NAT/PAT or SSH... to ping them, quite useful and simple. I suggest you update the doc accordingly when released ;) Cheers !
Hi, First of all thank you for this projet, it's very useful.
When I send 1 "UDP SoL packet" (with Mocha VNC Lite on iPhone), it results (after the log info) with 4 executions of the shutdown command in my case. The server shutdowns correctly but there is a quite annoying issue. If I try to restart the computer immediately (WoL packet), it's shut down again after several seconds. My guess is the others UDP SoL packets were stuck in some buffer and once the network card is up it is turned off again. Is that possible? Could it be that I ran the service 4 times and badly killed it? (even after rebooting.. I don't think so)
Log errors are just a user permission issue. This log is the result of 1 UDP SoL packet, is it normal it executes 4 times ?
Some features you could add: -A REST "login page" to secure the Sleep on Wan -A REST page to know the machine state (on/off)