Create helma.service

Add SystemD unit file with reasonable settings

See <https://www.baeldung.com/linux/run-java-application-as-service>
This commit is contained in:
Tobi Schäfer 2023-05-07 01:29:35 +02:00 committed by GitHub
parent ec67204d51
commit 58d893f044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

23
src/dist/extras/helma.service vendored Normal file
View file

@ -0,0 +1,23 @@
[Unit]
Description = Helma Object Publisher
After = syslog.target network.target
StartLimitIntervalSec = 0
[Service]
Restart = always
RestartSec = 1
SuccessExitStatus = 143
Type = simple
WorkingDirectory = /opt/helma
ExecStart = /usr/bin/java -server \
-Dfile.encoding=UTF-8 \
-Djava.awt.headless=true \
-Xms1024m -Xmx2048m \
-jar launcher.jar \
-w 8080 -x 8081
ExecStop = /bin/kill -15 $MAINPID
[Install]
WantedBy = multi-user.target