Create java_servicefile

This commit is contained in:
nagarjuna33 2023-03-16 14:36:05 +05:30 committed by GitHub
parent 6ef35dbd6c
commit 7cd700ff98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
java_servicefile Normal file
View file

@ -0,0 +1,20 @@
[Unit]
Description=springpetclinic java application
[Service]
User=ansible
# The configuration file application.properties should be here:
#change this to your workspace
WorkingDirectory=/home/ansible/
#path to executable.
#executable is a bash script which calls jar file
ExecStart=/usr/bin/java -jar spring-petclinic-2.7.3.jar
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target