Created
December 30, 2014 03:54
-
-
Save russelyang/012a7da92f3b6ca23277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Start serviio DLNA server" | |
author "aanno" | |
start on net-device-up IFACE=eth0 | |
stop on runlevel [!2345] | |
env enabled=1 | |
setuid tpasch | |
setgid tpasch | |
#respawn the process if it crashes | |
respawn | |
env SERVIIO_HOME=/home/tpasch/serviio-1.0.1 | |
script | |
[ "$enabled" = "1" ] || [ "$force_start" = "1" ] || exit 0 | |
# Setup Serviio specific properties | |
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Xmx512M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20" | |
# construct classpath | |
cd $SERVIIO_HOME | |
CLASSPATH="config" | |
for i in lib/*.jar; do | |
CLASSPATH="$CLASSPATH:$i" | |
done | |
exec /usr/bin/java $JAVA_OPTS -classpath $CLASSPATH org.serviio.MediaServer | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment