#!/bin/sh # /usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh # wechselt in synOTR-Verzeichnis und startet synOTR mit bzw. ohne LOG (je nach Konfiguration) # wurde das Skript von der GUI aufgerufen (Aufruf mit Parameter "GUI" für )? callFrom=$1 if [[ ! $callFrom = GUI ]] ; then callFrom=shell # set admin permission to user synOTR for DSM7 and above if [ $(synogetkeyvalue /etc.defaults/VERSION majorversion) -ge 7 ]; then if ! cat /etc/group | grep ^administrators | grep -q synOTR ; then echo "added user synOTR to group administrators ..." sed -i "/^administrators:/ s/$/,synOTR/" /etc/group fi fi else callFrom="GUI" fi # Arbeitsverzeichnis auslesen und hineinwechseln: APPDIR=$(cd $(dirname $0);pwd) cd ${APPDIR} # Konfigurationsdatei einbinden: CONFIG=app/etc/Konfiguration.txt . ./$CONFIG # check if script is already active # ps x|grep synOTR.sh|grep -v grep >/dev/null # if [ $? != "1" ] ; then # echo "synOTR läuft bereits!" # exit # fi synOTR_pid=$( /bin/pidof synOTR.sh ) if [ ! -z "$synOTR_pid" ] ; then if [ $callFrom = GUI ] ; then echo '
synOTR läuft bereits!
(Prozess-ID: '$synOTR_pid')
synOTR wurde gestartet ...
![]() |
Bitte warten, bis die Dateien |
---|
! ! ! Zielverzeichnis in der Konfiguration prüfen ! ! !
Programmlauf wird beendet.