From 48fa4e116c9bdce8a68f9bc43f69be7c8317746e Mon Sep 17 00:00:00 2001 From: Tom Piccirello <8296030+Piccirello@users.noreply.github.com> Date: Tue, 3 May 2022 21:12:15 -0700 Subject: [PATCH] Fix Docker legal notice when using existing config If the user is using a pre-existing config, don't update the legal notice. PR #16974. --- dist/docker/entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/docker/entrypoint.sh b/dist/docker/entrypoint.sh index 4d0be5df8..c985fa73d 100755 --- a/dist/docker/entrypoint.sh +++ b/dist/docker/entrypoint.sh @@ -10,12 +10,12 @@ 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 + 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 fi HOME="/config" XDG_CONFIG_HOME="/config" XDG_DATA_HOME="/data" qbittorrent-nox --webui-port=$WEBUI_PORT