key copy script

This commit is contained in:
b1ek 2024-01-07 12:30:36 +10:00
parent e7230f0ec9
commit eca32f0507
Signed by: blek
GPG Key ID: 14546221E3595D0C
3 changed files with 10 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
target
/secret.key
secret.key

View File

@ -12,9 +12,10 @@ If you do not meet the prerequisities, you are very unlikely to properly run thi
1. Clone the repo and cd to its directory
2. Generate a 1024 bytes long key: `head -c 1024 /dev/random > secret.key`
3. Put your server URL in `client/src/main.rs` on 4th line.
4. Install the client binary on your PC or laptop and set up a cron job to execute it once a minute.
5. Copy the `secret.key` to your server and `docker-compose up -d` it. Then pass it via the reverse proxy to whereever you want.
3. Copy it to the directories using `key-copy.sh`
4. Put your server URL in `client/src/main.rs` on 4th line.
5. Install the client binary on your PC or laptop and set up a cron job to execute it once a minute.
6. Copy the `secret.key` to your server and `docker-compose up -d` it. Then pass it via the reverse proxy to whereever you want.
## Embeding the gif

5
key-copy.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
rm -fr server/src/secret.key client/src/secret.key
cp secret.key server/src/secret.key
cp secret.key client/src/secret.key