Comments (5)
Maybe the user permission issue was the source of the problem after all:
- I followed this tutorial to allow non-root user to execute the command
sudo shutdown -h now
- I also changed the ownership of the /var/log/sleep-on-lan.log to be able to launch the
nohup /path/to/sol_binary > /var/log/sleep-on-lan.log 2>&1 &
as non-root - The SoL followed by immediate WoL worked well (in my case SoW and WoW)
- The log file now only shows 1 command execution for 1 UDP SoL packet sent
from sleep-on-lan.
Ok 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 :
- A Basic Auth has just been added (see #17), but new SNAPSHOT not uploaded yet
- For a "REST state", could be nice but i don't see how to do that : i can easily add a "/isUpAndRunning/" HTTP method, but the "/isAsleep" will never work as soon as the server you're trying to reach is offline ... or were you speaking about a "/state/<MAC_ADDRESS>/" command that would remotely tells the state of another remote server (would then probably just be a wrapper around some kind of ping commands) ?
from sleep-on-lan.
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..
- Thank you for the Basic Auth, it will allow to use HTTP for SoW. It's more reliable than UDP packets.
- Yes exactly I was talking about a kind of "ping wrapper" called by a "/isUpAndRunning/" HTTP method. Then a simple browser is enough to get this boolean value (no console needed). For example in case someone else is using the computer maybe it is better to do not shut it down.
from sleep-on-lan.
Ok, would #18 do the trick, could you review it ? (already coded, awaiting to see if it would meet your needs)
Would allow :
- to see if the server where sol is running is online or offline (immediate result)
- to see if another server is online or offline (will execute a IMCP request to the remote IP)
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).
from sleep-on-lan.
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 !
from sleep-on-lan.
Related Issues (20)
- Getting confused with syntax and versions HOT 6
- Block program start in case of configuration errors HOT 1
- New command allowing to generate the whole configuration from code
- Switch logging framework to logrus
- Add missing target platform
- add commands doesn't work HOT 12
- Only allow expected command types in custom commands definition
- Log file or event log on Windows? HOT 2
- Incorrect example for Commands? HOT 3
- Have better "default configuration" generated
- Split the ZIP distribution into one archive per platform
- Split README.md into separated pages
- New --verbose parameter
- Extra default filenames
- Logs where not displaying timestamps in line with system's timezone
- No response for HTTP sleep HOT 2
- Have extra delay before executing command HOT 3
- PC sleeps immediately after Wake on Lan after having used sleep on lan HOT 5
- Wake on LAN works strange when service work HOT 1
- Create non-console version, so conhost.exe doesn't also need to run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sleep-on-lan.