Created
August 16, 2021 10:52
-
-
Save r4rohan/ebce857090fb58ad380efc2b76636dfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Hello World Spring Boot Demo Service | |
[Service] | |
User=ubuntu | |
#change this to your workspace | |
WorkingDirectory=/home/ubuntu/exec-script | |
#path to executable | |
#executable is a bash script which calls jar file | |
ExecStart=/home/ubuntu/exec-script/hello-world | |
SuccessExitStatus=143 | |
TimeoutStopSec=10 | |
# asking systemd to always restart the service if program exits for whatever reason | |
Restart=always | |
# restart time | |
RestartSec=1 | |
# asking systemd to attempt to always restart your service | |
StartLimitIntervalSec=0 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment