mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
a8b6a40f13
PR #16972.
22 lines
661 B
Bash
Executable File
22 lines
661 B
Bash
Executable File
#!/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="/data" qbittorrent-nox --webui-port=$WEBUI_PORT
|