Update install-tr-control.sh

If ROOT_FOLDER is manually defined, do not override it.
This commit is contained in:
programatix 2021-08-09 00:07:24 +08:00 committed by GitHub
parent 14c6ede79a
commit 672c4fb602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,6 +400,7 @@ getTransmissionPath() {
# 用户如知道自己的 Transmission Web 所在的目录,直接修改这个值,以避免搜索所有目录
# ROOT_FOLDER="/usr/local/transmission/share/transmission"
# Fedora 或 Debian 发行版的默认 ROOT_FOLDER 目录
if [ ! -d "$ROOT_FOLDER" ]; then
if [ -f "/etc/fedora-release" ] || [ -f "/etc/debian_version" ] || [ -f "/etc/openwrt_release" ]; then
ROOT_FOLDER="/usr/share/transmission"
fi
@ -412,6 +413,7 @@ getTransmissionPath() {
if [ -f "/etc/synoinfo.conf" ]; then
ROOT_FOLDER="/var/packages/transmission/target/share/transmission"
fi
fi
if [ ! -d "$ROOT_FOLDER" ]; then
showLog "$MSG_FIND_WEB_FOLDER_FROM_PROCESS" "n"