no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | nslu:wakeonlan [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Wake on LAN ====== | ||
+ | This is a simple way that you can use the NSLU to boot up your PCs remotely via a web page. This can be useful for occasions such as needing remote access to a PC when it is switched off. As the NSLU is on 24/7 we use this small device to wake the others. | ||
+ | |||
+ | The NSLU will need to be on the same LAN as the PC, and the PC will need to be configured with WakeOnLan capability enabled. | ||
+ | |||
+ | * Login as root using SSH | ||
+ | * Install haserl and wakelan | ||
+ | |||
+ | < | ||
+ | ipkg install haserl | ||
+ | ipkg install wakelan | ||
+ | ipkg install lighttpd | ||
+ | </ | ||
+ | |||
+ | Add the following text to the file, substituting the 00: | ||
+ | |||
+ | Place this code somewhere in you DocumentRoot for lighttpd its: / | ||
+ | < | ||
+ | # wakeup-pc.hs | ||
+ | content-type: | ||
+ | |||
+ | < | ||
+ | <? / | ||
+ | </ | ||
+ | |||
+ | Configure you web server I'm using LIGHTTPD for its size and capability. | ||
+ | < | ||
+ | cgi.assign = (" | ||
+ | </ | ||
+ | |||
+ | Now just point your browser at http:// | ||
+ | |||
+ | There are bells and whistles that could be added to the script however this should be enough to provide basic functionality and get you on your way. | ||
+ | |||
+ | Taking the example a little further you can construct a nice STATUS display using something like this: | ||
+ | < | ||
+ | ipkg install arping | ||
+ | </ | ||
+ | CSS: Stylesheet for the table {{: | ||
+ | |||
+ | Table design adapted from: http:// | ||
+ | |||
+ | {{: | ||
+ | < | ||
+ | content-type: | ||
+ | |||
+ | <? | ||
+ | check() { | ||
+ | / | ||
+ | if [ $? -ne 0 ]; then | ||
+ | echo DOWN | ||
+ | else | ||
+ | echo UP | ||
+ | fi | ||
+ | } | ||
+ | linkage() { | ||
+ | echo wake-$1.hs | ||
+ | } | ||
+ | ?> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <link rel=" | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <? for i in cheese bingo wombat; do ?> | ||
+ | < | ||
+ | <? done ?> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Reference ===== | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | {{tag> |