Revise the section about legal notice

This commit is contained in:
Chocobo1 2023-11-24 19:04:58 +08:00
parent 84f5bf60b0
commit 869fe303fc
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
8 changed files with 20 additions and 18 deletions

2
.env
View File

@ -1,6 +1,6 @@
# Refer to Readme.md for an explanation of the variables
QBT_EULA=
QBT_LEGAL_NOTICE=
QBT_VERSION=latest
QBT_WEBUI_PORT=8080

View File

@ -45,14 +45,14 @@ https://github.com/qbittorrent/qBittorrent/issues
#### Environment variables
* `QBT_EULA` \
This environment variable defines whether you accept the end-user license agreement (EULA) of qBittorrent. \
**Put `accept` only if you understand and accepted the EULA.** You can find
the EULA [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
* `QBT_LEGAL_NOTICE` \
This environment variable defines whether you had read the legal notice of qBittorrent. \
**Put `confirm` only if you had read the legal notice.** You can find
the legal notice [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
* `QBT_VERSION` \
This environment variable specifies the version of qBittorrent-nox to use. \
For example, `4.4.5-1` is a valid entry. You can find all tagged versions [here](https://hub.docker.com/r/qbittorrentofficial/qbittorrent-nox/tags). \
Or you can put `latest` to use the latest stable release of qBittorrent. \
You can put `latest` to use the latest stable release of qBittorrent. \
If you are up to test the bleeding-edge version, you can put `alpha` to get the weekly build.
* `QBT_WEBUI_PORT` \
This environment variable sets the port number which qBittorrent WebUI will be binded to.
@ -73,7 +73,7 @@ https://github.com/qbittorrent/qBittorrent/issues
* If using Docker (not Docker Compose), edit the variables and run:
```shell
export \
QBT_EULA=<put_accept_here> \
QBT_LEGAL_NOTICE=<put_confirm_here> \
QBT_VERSION=latest \
QBT_WEBUI_PORT=8080 \
QBT_CONFIG_PATH="<your_path>/config" \
@ -85,7 +85,7 @@ https://github.com/qbittorrent/qBittorrent/issues
--rm \
--stop-timeout 1800 \
--tmpfs /tmp \
-e QBT_EULA \
-e QBT_LEGAL_NOTICE \
-e QBT_WEBUI_PORT \
-p "$QBT_WEBUI_PORT":"$QBT_WEBUI_PORT"/tcp \
-p 6881:6881/tcp \

View File

@ -8,7 +8,7 @@ services:
#- PAGID=10000
#- PGID=1000
#- PUID=1000
- QBT_EULA=${QBT_EULA}
- QBT_LEGAL_NOTICE=${QBT_LEGAL_NOTICE}
- QBT_VERSION=${QBT_VERSION}
- QBT_WEBUI_PORT=${QBT_WEBUI_PORT}
#- TZ=UTC

View File

@ -46,6 +46,7 @@ else
_eula=$(echo "$QBT_EULA" | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')
if [ "$_eula" = "accept" ]; then
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' "$qbtConfigFile"
echo "QBT_EULA=accept is deprecated and will be removed soon. The replacement is QBT_LEGAL_NOTICE=confirm"
else
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile"
fi

View File

@ -1,6 +1,6 @@
# Refer to Readme.md for an explanation of the variables
QBT_EULA=
QBT_LEGAL_NOTICE=
QBT_VERSION=devel
QBT_WEBUI_PORT=8080

View File

@ -34,14 +34,14 @@ It is also recommended to install Docker Compose as it can significantly ease th
#### Environment variables
* `QBT_EULA` \
This environment variable defines whether you accept the end-user license agreement (EULA) of qBittorrent. \
**Put `accept` only if you understand and accepted the EULA.** You can find
the EULA [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
* `QBT_LEGAL_NOTICE` \
This environment variable defines whether you had read the legal notice of qBittorrent. \
**Put `confirm` only if you had read the legal notice.** You can find
the legal notice [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
* `QBT_VERSION` \
This environment variable specifies the version of qBittorrent-nox to be built. \
For example, `4.4.0` is a valid entry. You can find all tagged versions [here](https://github.com/qbittorrent/qBittorrent/tags). \
Or you can put `devel` to build the latest development version.
You can put `devel` to build the latest development version.
* `QBT_WEBUI_PORT` \
This environment variable sets the port number which qBittorrent WebUI will be binded to.
Defaults to port `8080` if value is not set.
@ -61,7 +61,7 @@ There are some paths involved:
* Using Docker (not Docker Compose), simply run:
```shell
export \
QBT_EULA=<put_accept_here> \
QBT_LEGAL_NOTICE=<put_confirm_here> \
QBT_VERSION=devel \
QBT_WEBUI_PORT=8080 \
QBT_CONFIG_PATH="<your_path>/config" \
@ -73,7 +73,7 @@ There are some paths involved:
--rm \
--stop-timeout 1800 \
--tmpfs /tmp \
-e QBT_EULA \
-e QBT_LEGAL_NOTICE \
-e QBT_WEBUI_PORT \
-e TZ=UTC \
-p "$QBT_WEBUI_PORT":"$QBT_WEBUI_PORT"/tcp \

View File

@ -9,7 +9,7 @@ services:
#- PAGID=10000
#- PGID=1000
#- PUID=1000
- QBT_EULA=${QBT_EULA}
- QBT_LEGAL_NOTICE=${QBT_LEGAL_NOTICE}
- QBT_VERSION=${QBT_VERSION}
- QBT_WEBUI_PORT=${QBT_WEBUI_PORT}
#- TZ=UTC

View File

@ -46,6 +46,7 @@ else
_eula=$(echo "$QBT_EULA" | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')
if [ "$_eula" = "accept" ]; then
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' "$qbtConfigFile"
echo "QBT_EULA=accept is deprecated and will be removed soon. The replacement is QBT_LEGAL_NOTICE=confirm"
else
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile"
fi