Last active
December 4, 2022 15:57
-
-
Save vsbabu/c0ba2127be5dbe851e74c5326d5ff318 to your computer and use it in GitHub Desktop.
Skeleton service file for SystemD (/etc/systemd/system/filename.service)
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=Spring Boot My Application JVM | |
After=syslog.target | |
[Service] | |
User=myappuser | |
# send to /dev/null so that syslog doesn't get flooded | |
Environment='STDOUT=/dev/null' | |
# logback if any on stderr can be sent here; ensure myappuser has access | |
Environment='STDERR=/some/path/myapp/logs/stderr.log' | |
# ensure that you've logging.path defined in your config file springboot looks at | |
ExecStart=/bin/sh -c "/some/path/myapp.jar > ${STDOUT} 2> ${STDERR}" | |
SuccessExitStatus=143 | |
[Install] | |
WantedBy=multi-user.target | |
Alias=myapp.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment