From 5254e9bd6a33c34a75a93965f1fbc3b59614dbae Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 12 Apr 2025 15:06:37 +0200 Subject: [PATCH] Finishing touches --- README.md | 8 ++++---- install.sh => scripts/install.sh | 2 +- scripts/issue_cert.sh | 1 + reset.sh => scripts/reset.sh | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) rename install.sh => scripts/install.sh (96%) rename reset.sh => scripts/reset.sh (95%) diff --git a/README.md b/README.md index 29a7664..82ff531 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ - in `docker-compose.yml`, uncomment everything under `gluetun:` and the two lines `network_mode` and `depends_on` - Put `wg0.conf` in the root directory 3. Set up nameservers (records pointing to companion) and wait until it's live -4. `./install.sh` +4. `./scripts/install.sh` 5. The companion should be accessible at your domain with a self-signed cert. \ - To get a real one do`./issue_cert.sh` + To get a real one do `./scripts/issue_cert.sh` 6. **Schedule `reset.sh`**. This rotates your IP, updates containers, and it's generally a good practice to auto restart. \ This restarts every hour:00. You can change it, if you want to. / If you have multiple companions, you should make them restart at different times. ``` - @reboot sleep 30s && cd /opt/invidious-companion/reset.sh - 0 * * * * cd /opt/invidious-companion/reset.sh + @reboot sleep 30s && cd /opt/invidious-companion/scripts/reset.sh + 0 * * * * cd /opt/invidious-companion/scripts/reset.sh ``` diff --git a/install.sh b/scripts/install.sh similarity index 96% rename from install.sh rename to scripts/install.sh index ab3c0cb..7d4b515 100755 --- a/install.sh +++ b/scripts/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd "$(dirname "$0")" +cd "$(dirname "$0")/.." . .env git submodule update --init diff --git a/scripts/issue_cert.sh b/scripts/issue_cert.sh index 10ea329..d137fa7 100755 --- a/scripts/issue_cert.sh +++ b/scripts/issue_cert.sh @@ -5,6 +5,7 @@ cd "$(dirname "$0")/.." CERT_DIR=/etc/ssl/$DOMAIN docker compose exec acme --issue --server letsencrypt -d $DOMAIN --webroot /var/www/html/$DOMAIN +docker compose exec acme rm $CERT_DIR/key.pem $CERT_DIR/fullchain.pem docker compose exec acme --install-cert -d $DOMAIN --key-file $CERT_DIR/key.pem --fullchain-file $CERT_DIR/fullchain.pem docker compose exec nginx nginx -s reload diff --git a/reset.sh b/scripts/reset.sh similarity index 95% rename from reset.sh rename to scripts/reset.sh index ac98768..127b1de 100755 --- a/reset.sh +++ b/scripts/reset.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd "$(dirname "$0")" +cd "$(dirname "$0")/.." . .env ./scripts/update_config.sh