From 4b488cd34918c94b56f833d1ee02f36fe6cf4f8f Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 12 Aug 2017 13:56:15 -0600 Subject: [PATCH] Added example env file for systemd Signed-off-by: Andrew DeMaria --- contrib/airsonic-systemd-env | 31 +++++++++++++++++++++++++++++++ contrib/airsonic.service | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 contrib/airsonic-systemd-env diff --git a/contrib/airsonic-systemd-env b/contrib/airsonic-systemd-env new file mode 100644 index 00000000..64357135 --- /dev/null +++ b/contrib/airsonic-systemd-env @@ -0,0 +1,31 @@ +# Set the location of the standalone war to use +#JAVA_JAR=/var/airsonic/airsonic.war + +# Set any java opts separated by spaces +#JAVA_OPTS=-Xmx700m + +# Set a different location for airsonic home. +# If this path is /var/libresonic or even contains "libresonic", +# the data from a previous libresonic can be used as is (i.e. without +# renaming libresonic.properties,db/libresonic*,etc +#AIRSONIC_HOME=/var/airsonic + +# Change the port to listen on +#PORT=8080 + +# Change the path that is listened on +#CONTEXT_PATH=/airsonic + +# Add any java args. These are different than JAVA_OPTS in that +# they are passed directly to the program. The default is empty: +#JAVA_ARGS= + +# Note that there are several settings for spring boot, not explicitly listed +# here, but can be used in either JAVA_OPTS or JAVA_ARGS. The full list +# can be found here: +# https://docs.spring.io/spring-boot/docs/1.4.5.RELEASE/reference/htmlsingle/#common-application-properties +# For example to set debug across the board: +#JAVA_ARGS=--debug + +# Or to change the ip address that is listened on: +#JAVA_ARGS=--server.address=127.0.0.1 diff --git a/contrib/airsonic.service b/contrib/airsonic.service index fa0990c8..e3b0e274 100644 --- a/contrib/airsonic.service +++ b/contrib/airsonic.service @@ -13,11 +13,11 @@ Environment="CONTEXT_PATH=/airsonic" Environment="JAVA_ARGS=" EnvironmentFile=-/etc/sysconfig/airsonic ExecStart=/usr/bin/java \ - ${JAVA_OPTS} \ + $JAVA_OPTS \ -Dairsonic.home=${AIRSONIC_HOME} \ -Dserver.context-path=${CONTEXT_PATH} \ -Dserver.port=${PORT} \ - -jar ${JAVA_JAR} ${JAVA_ARGS} + -jar ${JAVA_JAR} $JAVA_ARGS User=airsonic Group=airsonic