QPKG_SERVICE_PROGRAM must be a unique name (least it overrides other startup scripts in /etc/init.d)

This commit is contained in:
Reinhard Pointner 2018-07-10 14:23:38 +07:00
parent 8682fc084e
commit f4538acb5e
3 changed files with 7 additions and 31 deletions

View File

@ -5,10 +5,7 @@ ICON := ../icons/filebot.svg
resize-icons:
# QPKG ICONS
convert -verbose $(ICON) -resize 64x64 -gravity center -background transparent -extent 64x64 icons/$(QPKG_NAME).png
convert -verbose $(ICON) -resize 64x64 -gravity center -background transparent -extent 64x64 -colorspace gray icons/$(QPKG_NAME)_gray.png
convert -verbose $(ICON) -resize 80x80 -gravity center -background transparent -extent 80x80 icons/$(QPKG_NAME)_80.png
# REPOSITORY ICONS
convert -verbose $(ICON) -resize 100x100 -gravity center -background transparent -extent 100x100 icons/$(QPKG_NAME)_100.png

View File

@ -1,29 +1,8 @@
#!/bin/sh
PRG="$0"
CONF="/etc/config/qpkg.conf"
QPKG_NAME="filebot"
QPKG_ROOT=$(/sbin/getcfg $QPKG_NAME Install_Path -f $CONF)
# resolve relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
# get canonical path
WORKING_DIR=`pwd`
PRG_DIR=`dirname "$PRG"`
FILEBOT_HOME=`cd "$PRG_DIR" && pwd`
# restore original working dir (which may be /root and yield permission denied)
if [ -x "$WORKING_DIR" ]; then
cd "$WORKING_DIR"
else
cd "$FILEBOT_HOME/../.." # System Volume Path (e.g. /share/CACHEDEV1_DATA)
fi
# make sure required environment variables are set
if [ -z "$USER" ]; then
@ -47,8 +26,8 @@ MEDIA_PARSER="libmediainfo" # use libmediainfo
FFPROBE="/mnt/ext/opt/medialibrary/bin/ffprobe"
# select application data folder
APP_DATA="$FILEBOT_HOME/data/$USER"
LIBRARY_PATH="$FILEBOT_HOME/lib/$(uname -m)"
APP_DATA="$QPKG_ROOT/data/$USER"
LIBRARY_PATH="$QPKG_ROOT/lib/$(uname -m)"
# start filebot
java -Dapplication.deployment=qpkg -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"
java -Dapplication.deployment=qpkg -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$QPKG_ROOT/jar/filebot.jar" "$@"

View File

@ -1,7 +1,7 @@
#!/bin/sh
CONF="/etc/config/qpkg.conf"
QPKG_NAME="filebot"
QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f $CONF`
QPKG_ROOT=$(/sbin/getcfg $QPKG_NAME Install_Path -f $CONF)
case "$1" in