From eca32f05075754ce6eb42eee4aa79900bc95df5c Mon Sep 17 00:00:00 2001 From: b1ek Date: Sun, 7 Jan 2024 12:30:36 +1000 Subject: [PATCH] key copy script --- .gitignore | 2 +- README.md | 7 ++++--- key-copy.sh | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 key-copy.sh diff --git a/.gitignore b/.gitignore index 869bebe..ba3c329 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ target -/secret.key \ No newline at end of file +secret.key diff --git a/README.md b/README.md index e982325..41de8a6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/key-copy.sh b/key-copy.sh new file mode 100755 index 0000000..6ee991f --- /dev/null +++ b/key-copy.sh @@ -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