-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6aa493a
commit 4d13fe3
Showing
2 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
Simple remote shutdown server that listens on port 2137 on endpoint `/<secret>/shutdown`, inspired by https://github.com/karpach/remote-shutdown-pc | ||
Simple remote shutdown server that listens on port 8000 on endpoint `/<secret>/shutdown`, inspired by https://github.com/karpach/remote-shutdown-pc | ||
|
||
## Setup | ||
First run `./remote_shutdown` this will create a file in `$XDG_CONFIG_DIR/remote_shutdown/secret` | ||
|
||
The default content is `secret`, you can change that to whatever random characters you want. You will have to include the secret when calling shutdown endpoint, for default configuration it will be `127.0.0.1:2137/secret/shutdown` | ||
The default content is `secret`, you can change that to whatever random characters you want. You will have to include the secret when calling shutdown endpoint, for default configuration it will be `127.0.0.1:8000/secret/shutdown` | ||
|
||
The default delay is 60s, you can change that by passing query parameter to the endpoint, for example `/secret/shutdown?delay=30` | ||
|
||
After the endpoint is called a popup will appear where you can abort the shutdown process. | ||
|
||
To change the port, run the binary with `ROCKET_PORT` env variable, for example: `ROCKET_PORT=2137 ./remote_shutdown` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[global] | ||
address = "127.0.0.1" | ||
port = 2137 | ||
port = 8000 | ||
workers = 1 | ||
keep_alive = 5 |