feat(shell): 安装脚本增加群晖判断

This commit is contained in:
栽培者 2020-09-14 18:59:21 +08:00
parent c26a0761e3
commit 4b31bcfa3c
2 changed files with 16 additions and 2 deletions

View File

@ -3,7 +3,7 @@
ARG1="$1"
ROOT_FOLDER=""
SCRIPT_NAME="$0"
SCRIPT_VERSION="1.2.2-beta2"
SCRIPT_VERSION="1.2.3"
VERSION=""
WEB_FOLDER=""
ORG_INDEX_FILE="index.original.html"
@ -408,6 +408,11 @@ getTransmissionPath() {
ROOT_FOLDER="/usr/local/share/transmission"
fi
# 群晖
if [ -f "/etc/synoinfo.conf" ]; then
ROOT_FOLDER="/var/packages/transmission/target/share/transmission"
fi
if [ ! -d "$ROOT_FOLDER" ]; then
showLog "$MSG_FIND_WEB_FOLDER_FROM_PROCESS" "n"
infos=`ps -Aww -o command= | sed -r -e '/[t]ransmission-da/!d' -e 's/ .+//'`

View File

@ -3,7 +3,7 @@
ARG1="$1"
ROOT_FOLDER=""
SCRIPT_NAME="$0"
SCRIPT_VERSION="1.2.2-beta2"
SCRIPT_VERSION="1.2.3"
VERSION=""
WEB_FOLDER=""
ORG_INDEX_FILE="index.original.html"
@ -404,6 +404,15 @@ getTransmissionPath() {
ROOT_FOLDER="/usr/share/transmission"
fi
if [ -f "/bin/freebsd-version" ]; then
ROOT_FOLDER="/usr/local/share/transmission"
fi
# 群晖
if [ -f "/etc/synoinfo.conf" ]; then
ROOT_FOLDER="/var/packages/transmission/target/share/transmission"
fi
if [ ! -d "$ROOT_FOLDER" ]; then
showLog "$MSG_FIND_WEB_FOLDER_FROM_PROCESS" "n"
infos=`ps -Aww -o command= | sed -r -e '/[t]ransmission-da/!d' -e 's/ .+//'`