diff options
Diffstat (limited to 'serviio.sh')
-rw-r--r-- | serviio.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/serviio.sh b/serviio.sh new file mode 100644 index 0000000..451a645 --- /dev/null +++ b/serviio.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ $UID -eq 0 ] | ||
4 | then | ||
5 | if [[ -f /etc/profile.d/jdk.sh ]]; then | ||
6 | . /etc/profile.d/jdk.sh | ||
7 | elif [[ -f /etc/profile.d/jre.sh ]]; then | ||
8 | . /etc/profile.d/jre.sh | ||
9 | fi | ||
10 | export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH | ||
11 | SERVIIO_HOME="/usr/share/java/serviio" | ||
12 | SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config" | ||
13 | JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=ffmpeg" | ||
14 | |||
15 | java -Xmx384M $JAVA_OPTS -classpath $SERVIIO_CLASS_PATH org.serviio.MediaServer "$@" | ||
16 | else | ||
17 | echo "Must be run as root." | ||
18 | fi | ||