From 718ea5f78bf351697d9bef857fb3c6577b88add9 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Wed, 28 Oct 2015 22:50:35 +0100 Subject: [PATCH] Update systemd service documentation - update script with valid exit status to ensure service stops cleanly - clarify unused customization variables Closes gh-4334 --- spring-boot-docs/src/main/asciidoc/deployment.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/deployment.adoc b/spring-boot-docs/src/main/asciidoc/deployment.adoc index 8eb6d4b1d5..3a95d1e00b 100644 --- a/spring-boot-docs/src/main/asciidoc/deployment.adoc +++ b/spring-boot-docs/src/main/asciidoc/deployment.adoc @@ -459,6 +459,7 @@ can add the following script in `/etc/systemd/system/myapp.service`: [Service] User=myapp ExecStart=/var/myapp/myapp.jar + SuccessExitStatus=143 [Install] WantedBy=multi-user.target @@ -517,6 +518,12 @@ the default behavior in a script or on the command line: in the script. |=== +NOTE: The `PID_FOLDER`, `LOG_FOLDER` and `LOG_FILENAME` variables are only valid for an +`init.d` service. With `systemd` the equivalent customizations are made using '`service`' +script. Check the +http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit +configuration man page] for more details. + In addition, the following properties can be changed when the script is written by using the `embeddedLaunchScriptProperties` option of the Spring Boot Maven or Gradle plugins.