mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
added Dockefile and entrypoint.sh
It uses the latest available version for libtorrent and builds both libtorrent and qBittorrent with Cmake + ninja The legal notice must be accepted trought an environment variable called LEGAL and passed to docker when the container is run, to set it true one must set "LEGAL=accept" PR #16828.
This commit is contained in:
parent
b85b1e8834
commit
de8377ab53
3 changed files with 125 additions and 0 deletions
21
dist/docker/entrypoint.sh
vendored
Executable file
21
dist/docker/entrypoint.sh
vendored
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -f /config/qBittorrent/qBittorrent.conf ]; then
|
||||
mkdir -p /config/qBittorrent/
|
||||
cat << EOF > /config/qBittorrent/qBittorrent.conf
|
||||
[BitTorrent]
|
||||
Session\DefaultSavePath=/downloads
|
||||
Session\TempPath=/downloads/temp
|
||||
|
||||
[LegalNotice]
|
||||
Accepted=false
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$LEGAL" = "accept" ] ; then
|
||||
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' /config/qBittorrent/qBittorrent.conf
|
||||
else
|
||||
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' /config/qBittorrent/qBittorrent.conf
|
||||
fi
|
||||
|
||||
HOME="/config" XDG_CONFIG_HOME="/config" XDG_DATA_HOME="/config" qbittorrent-nox --webui-port=$WEBUI_PORT
|
Loading…
Add table
Add a link
Reference in a new issue