Permalink
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (38 sloc) 1.19 KB
#
# To run diet4j-jsvc from jsvc using systemd, use this template and modify
# according to your needs.
#
# The tag FIXME: gives a good idea which elements to change
#
[Unit]
Description=FIXME: some diet4j-based Java service (jsvc)
After=network.target
[Service]
Type=simple
PIDFile=/var/run/FIXME-name-of-service.pid
Environment=PIDFILE=/var/run/FIXME-name-of-service.pid
Environment=DIET4J_JAVA_HOME=/usr/lib/jvm/default-runtime
Environment=DIET4J_VERSION=FIXME-0.14
Environment=OPTS=-nodetach
Environment=ARGS=
Environment=USER=root
Environment=ERRFILE=SYSLOG
Environment=OUTFILE=SYSLOG
Environment=ROOTMODULE=FIXME-diet4j-examples-activate
ExecStart=/usr/bin/jsvc \
-cp /usr/lib/java/org/diet4j/diet4j-jsvc/${DIET4J_VERSION}/diet4j-jsvc-${VERSION}.jar \
-user ${USER} \
-java-home ${DIET4J_JAVA_HOME} \
-pidfile ${PIDFILE} \
-errfile ${ERRFILE} \
-outfile ${OUTFILE} \
${OPTS} \
org.diet4j.jsvc.Diet4jDaemon \
${ROOTMODULE} \
${ARGS}
ExecStop=/usr/bin/jsvc \
-pidfile ${PIDFILE} \
-stop \
org.diet4j.jsvc.Diet4jDaemon
[Install]
WantedBy=multi-user.target