From 8f247bb5d253196143f5f433f225290e3be1813e Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Tue, 23 Jan 2024 18:49:14 -0500 Subject: [PATCH] Support FlareSolverr (#79) * Update startup_script.sh * Update README.md --- README.md | 7 +++++-- scripts/startup_script.sh | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aa68149..3ffee19 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,11 @@ There are a number of environment variables available to configure Suwayomi: | **UPDATE_INTERVAL** | `-` | Time in hours - 0 to disable it - (doesn't have to be full hours e.g. 12.5) - range: 6 <= n < ∞ - Interval in which the global update will be automatically triggered | | **UPDATE_MANGA_INFO** | `-` | If manga info should be updated along with the chapters | | **BACKUP_TIME** | `-` | Range: hour: 0-23, minute: 0-59 - Time of day at which the automated backup should be triggered | -| **BACKUP_INTERVAL** | `-` | # Time in days - 0 to disable it - range: 1 <= n < ∞ - Interval in which the server will automatically create a backup | -| **BACKUP_TTL** | `-` | # Time in days - 0 to disable it - range: 1 <= n < ∞ - How long backup files will be kept before they will get deleted | +| **BACKUP_INTERVAL** | `-` | Time in days - 0 to disable it - range: 1 <= n < ∞ - Interval in which the server will automatically create a backup | +| **BACKUP_TTL** | `-` | Time in days - 0 to disable it - range: 1 <= n < ∞ - How long backup files will be kept before they will get deleted | +| **FLARESOLVERR_ENABLED** | `-` | Whether FlareSolverr is enabled and avalible to use | +| **FLARESOLVERR_URL** | `-` | The URL of the FlareSolverr instance | +| **FLARESOLVERR_TIMEOUT** | `-` | Time in seconds for FlareSolverr to timeout if the challenge is not solved | # Docker tags diff --git a/scripts/startup_script.sh b/scripts/startup_script.sh index 328c9e7..6aaf1dc 100755 --- a/scripts/startup_script.sh +++ b/scripts/startup_script.sh @@ -66,4 +66,9 @@ sed -i -r "s/server.backupTime = (.*)/server.backupTime = ${BACKUP_TIME:-\1}/" / sed -i -r "s/server.backupInterval = (.*)/server.backupInterval = ${BACKUP_INTERVAL:-\1}/" /home/suwayomi/.local/share/Tachidesk/server.conf sed -i -r "s/server.backupTTL = (.*)/server.backupTTL = ${BACKUP_TTL:-\1}/" /home/suwayomi/.local/share/Tachidesk/server.conf +# cloudflare bypass +sed -i -r "s/server.flareSolverrEnabled = (.*)/server.flareSolverrEnabled = ${FLARESOLVERR_ENABLED:-\1}/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.flareSolverrUrl = \"(.*)\"/server.flareSolverrUrl = \"${FLARESOLVERR_URL:-\1}\"/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.flareSolverrTimeout = (.*)/server.flareSolverrTimeout = ${FLARESOLVERR_TIMEOUT:-\1}/" /home/suwayomi/.local/share/Tachidesk/server.conf + exec java -Duser.home=/home/suwayomi -jar "/home/suwayomi/startup/tachidesk_latest.jar";