2019-02-06 19:37:46 +01:00
|
|
|
# source file https://raw.githubusercontent.com/airsonic/airsonic/master/contrib/airsonic.service
|
|
|
|
# install documentation : https://airsonic.github.io/docs/install/war-standalone/
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=__APP__ Media Server
|
|
|
|
After=remote-fs.target network.target
|
|
|
|
AssertPathExists=__FINALPATH__
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
2019-05-22 22:10:48 +02:00
|
|
|
Environment="JAVA_JAR=__FINALPATH__/airsonic.war"
|
2019-02-06 19:37:46 +01:00
|
|
|
Environment="JAVA_OPTS=-Xmx700m"
|
2019-05-22 22:10:48 +02:00
|
|
|
Environment="AIRSONIC_HOME=__FINALPATH__"
|
|
|
|
Environment="PORT=__PORT__"
|
|
|
|
Environment="CONTEXT_PATH=__PATH__"
|
2019-02-06 19:37:46 +01:00
|
|
|
Environment="JAVA_ARGS="
|
|
|
|
EnvironmentFile=-/etc/default/airsonic
|
|
|
|
ExecStart=/usr/bin/java \
|
|
|
|
$JAVA_OPTS \
|
|
|
|
-Dairsonic.home=${AIRSONIC_HOME} \
|
|
|
|
-Dserver.context-path=${CONTEXT_PATH} \
|
|
|
|
-Dserver.port=${PORT} \
|
|
|
|
-jar ${JAVA_JAR} $JAVA_ARGS
|
|
|
|
User=__APP__
|
|
|
|
Group=__APP__
|
|
|
|
|
|
|
|
# Force systemd to wait XX sec for the process to start before killing it
|
|
|
|
# TimeoutStopSec= 180
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|