Always check for EULA env variable

Otherwise if the first run fails, there won't be easy way to fix it.
This commit is contained in:
Chocobo1 2023-03-21 13:28:30 +08:00
parent 94dcacb8b3
commit bf1561ecec
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
2 changed files with 10 additions and 10 deletions

View File

@ -35,13 +35,13 @@ Session\TempPath=/downloads/temp
[LegalNotice]
Accepted=false
EOF
fi
if [ "$QBT_EULA" = "accept" ]; then
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' "$qbtConfigFile"
else
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile"
fi
fi
# those are owned by root by default
# don't change existing files owner in `$downloadsPath`

View File

@ -35,13 +35,13 @@ Session\TempPath=/downloads/temp
[LegalNotice]
Accepted=false
EOF
fi
if [ "$QBT_EULA" = "accept" ]; then
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' "$qbtConfigFile"
else
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile"
fi
fi
# those are owned by root by default
# don't change existing files owner in `$downloadsPath`