Skip to content

Commit 90d4afd

Browse files
committed
named sleep-on-lan, published
1 parent a0c21a6 commit 90d4afd

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
sleep-server
1+
sleep-on-lan
22
============
33

44
It's easy to wake your computer with [Wake-On-Lan](http://en.wikipedia.org/wiki/Wake-on-LAN)
55

6-
Now you can send your computer back to sleep with HTTP!
6+
Now you can send your computer back to sleep with Sleep-On-Lan!
77

8-
### Install
8+
### Install
99

1010
[Get Node.js](http://nodejs.org/download/)
1111

1212
```
13-
npm install -g sleep-server
13+
npm install -g sleep-on-lan
1414
```
1515

1616
### Help
1717

1818
```
19-
Usage: sleep-server [options]
19+
Usage: sleep-on-lan [options]
2020
2121
Options:
2222
@@ -33,8 +33,8 @@ npm install -g sleep-server
3333

3434
Host A
3535
```sh
36-
$ sleep-server
37-
Listening for sleep requests at http://0.0.0.0:57339/sleep
36+
$ sleep-on-lan
37+
Listening at http://0.0.0.0:57339/sleep
3838
```
3939

4040
Host B
@@ -58,6 +58,16 @@ Host A
5858
Time: Fri Jun 13 2014 22:36:15 GMT+1000 (EST)
5959
```
6060

61+
#### Run `sleep-on-lan` at startup
62+
63+
```
64+
$ crontab -e
65+
# insert the line:
66+
@reboot sleep-on-lan
67+
# save and exit
68+
crontab: installing new crontab
69+
```
70+
6171
#### MIT License
6272

6373
Copyright © 2014 Jaime Pillora <dev@jpillora.com>

bin/sleep-server renamed to bin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('../');
2+
require('./');

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
2-
"name": "sleep-server",
2+
"name": "sleep-on-lan",
33
"version": "0.3.2",
44
"main": "./server",
55
"bin": {
6-
"sleep-server": "bin/sleep-server"
6+
"sleep-on-lan": "./bin.js"
77
},
8+
"repository": {
9+
"type": "git",
10+
"url": "https://jpillora@github.com/jpillora/sleep-on-lan"
11+
},
12+
"author": "Jaime Pillora <dev@jpillora.com>",
813
"dependencies": {
914
"commander": "^2.2.0"
1015
}

server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ switch(os.platform()) {
1313
break;
1414
default:
1515
console.error("Operating system not supported. "+
16-
"Please send a pull request to http://github.com/jpillora/sleep-server");
16+
"Please send a pull request to http://github.com/jpillora/sleep-on-lan");
1717
process.exit(1);
1818
}
1919

@@ -64,7 +64,7 @@ http.createServer(function (request,response) {
6464
}, program.wait);
6565
response.end('ok');
6666
}).listen(program.port, function() {
67-
console.log('Listening for sleep requests at http://%s:%s%s', program.host, program.port, program.url);
67+
console.log('Listening at http://%s:%s%s', program.host, program.port, program.url);
6868
});
6969

7070
//if interval is late by more than 2secs, assume has just awoken

0 commit comments

Comments
 (0)