From b4bbf0918e382e823e5a2bdd4d8754f4aa407f60 Mon Sep 17 00:00:00 2001 From: Stephan Geisler Date: Sun, 16 Jan 2022 22:32:48 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9EAPP/ui/synOCR-start.sh=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APP/ui/synOCR-start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/APP/ui/synOCR-start.sh b/APP/ui/synOCR-start.sh index 1cd5567..0f30634 100644 --- a/APP/ui/synOCR-start.sh +++ b/APP/ui/synOCR-start.sh @@ -4,11 +4,12 @@ # was the script called from the GUI (call with parameter "GUI")? callFrom=$1 - dsm_version=6 + dsm_version=$(synogetkeyvalue /etc.defaults/VERSION majorversion) + machinetyp=$(uname --machine) + if [[ ! $callFrom = GUI ]] ; then callFrom=shell # adjust PATH: - machinetyp=$(uname --machine) if [ $machinetyp = "x86_64" ]; then PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/opt/usr/bin:/usr/syno/synoman/webman/3rdparty/synOCR/bin elif [ $machinetyp = "aarch64" ]; then @@ -16,8 +17,7 @@ fi # set docker and admin permission to user synOCR for DSM7 and above - if [ $(synogetkeyvalue /etc.defaults/VERSION majorversion) -ge 7 ]; then - dsm_version=7 + if [ $dsm_version -ge 7 ]; then echo "synOCR run at DSM7 or above" echo -n " ➜ check admin permissions: " if ! cat /etc/group | grep ^administrators | grep -q synOCR ; then