Skip to content

Commit

Permalink
update default port
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-ciszewski committed Aug 27, 2024
1 parent 6aa493a commit 4d13fe3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
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`
2 changes: 1 addition & 1 deletion Rocket.toml
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

0 comments on commit 4d13fe3

Please sign in to comment.