mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2026-05-07 07:35:50 +02:00
Merge pull request #444 from papadave66/freebsd-ps
FreeBSD detection and FreeBSD ps(1) compatibility fix
This commit is contained in:
@@ -403,10 +403,14 @@ getTransmissionPath() {
|
||||
if [ -f "/etc/fedora-release" ] || [ -f "/etc/debian_version" ]; then
|
||||
ROOT_FOLDER="/usr/share/transmission"
|
||||
fi
|
||||
|
||||
if [ -f "/bin/freebsd-version" ]; then
|
||||
ROOT_FOLDER="/usr/local/share/transmission"
|
||||
fi
|
||||
|
||||
if [ ! -d "$ROOT_FOLDER" ]; then
|
||||
showLog "$MSG_FIND_WEB_FOLDER_FROM_PROCESS" "n"
|
||||
infos=`ps -ef | awk '/[t]ransmission-da/{print $8}'`
|
||||
infos=`ps -Aww -o command= | sed -r -e '/[t]ransmission-da/!d' -e 's/ .+//'`
|
||||
if [ "$infos" != "" ]; then
|
||||
echo " √"
|
||||
search="bin/transmission-daemon"
|
||||
@@ -502,4 +506,4 @@ if [ $AUTOINSTALL = 1 ]; then
|
||||
else
|
||||
# 执行
|
||||
showMainMenu
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -406,7 +406,7 @@ getTransmissionPath() {
|
||||
|
||||
if [ ! -d "$ROOT_FOLDER" ]; then
|
||||
showLog "$MSG_FIND_WEB_FOLDER_FROM_PROCESS" "n"
|
||||
infos=`ps -ef | awk '/[t]ransmission-da/{print $8}'`
|
||||
infos=`ps -Aww -o command= | sed -r -e '/[t]ransmission-da/!d' -e 's/ .+//'`
|
||||
if [ "$infos" != "" ]; then
|
||||
echo " √"
|
||||
search="bin/transmission-daemon"
|
||||
@@ -502,4 +502,4 @@ if [ $AUTOINSTALL = 1 ]; then
|
||||
else
|
||||
# 执行
|
||||
showMainMenu
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user